K32GetFileModuleNameExA could not be found in Kernal32.dll

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 1031 Views - Last Post: 18 May 2013 - 11:38 AM Rate Topic: -----

#1 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 11 May 2013 - 03:56 PM

When I try to run a program I made on a vista machine I get this error: "K32GetFileModuleNameExA could not be found in Kernal32.dll"

I built the program on Windows 8 with Microsoft Visual Studio C++ 2012. I'm using the allegro 5 game library, if that could be an issue.

I was messing around with project settings so I've tried building and running with toolset VS 2012 Win XP and the default setting.
Is This A Good Question/Topic? 0
  • +

Replies To: K32GetFileModuleNameExA could not be found in Kernal32.dll

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 4154
  • View blog
  • Posts: 12,941
  • Joined: 25-December 09

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 11 May 2013 - 04:25 PM

Quote

When I try to run a program I made on a vista machine

Quote

I built the program on Windows 8 with Microsoft Visual Studio C++ 2012

So did you compile this program on Vista or Windows 8?

Or are you trying to run a program you built on one of these operating systems on the other operating system?

Jim
Was This Post Helpful? 0
  • +
  • -

#3 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 11 May 2013 - 09:27 PM

View Postjimblumberg, on 11 May 2013 - 04:25 PM, said:

Quote

When I try to run a program I made on a vista machine

Quote

I built the program on Windows 8 with Microsoft Visual Studio C++ 2012

So did you compile this program on Vista or Windows 8?

Or are you trying to run a program you built on one of these operating systems on the other operating system?

Jim


I built it on Windows 8, trying to run get it to run on Vista.

View PostAxman10, on 11 May 2013 - 09:25 PM, said:

View Postjimblumberg, on 11 May 2013 - 04:25 PM, said:

Quote

When I try to run a program I made on a vista machine

Quote

I built the program on Windows 8 with Microsoft Visual Studio C++ 2012

So did you compile this program on Vista or Windows 8?

Or are you trying to run a program you built on one of these operating systems on the other operating system?

Jim


I built it on Windows 8, trying to run get it to run on Vista.


I got it to run on Windows 7, but 8 is pretty much the same as 7 anyways.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 11 May 2013 - 10:16 PM

Did you define PSAPI_VERSION=1 in your compile time options? See the last paragraph in the Remarks section of the MSDN documentation: http://msdn.microsof...8(v=vs.85).aspx
Was This Post Helpful? 0
  • +
  • -

#5 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 11 May 2013 - 11:42 PM

View PostSkydiver, on 11 May 2013 - 10:16 PM, said:

Did you define PSAPI_VERSION=1 in your compile time options? See the last paragraph in the Remarks section of the MSDN documentation: http://msdn.microsof...8(v=vs.85).aspx

I don't know how to change compile time options.

Offtopic:

That's one thing that has been bothering me. I have been learning how to program and I feel I've come pretty far, but that's just it. I can develop a program that works when I hit F5 to debug, but I don't know anything about the options I can use to build it for certain platforms etc.
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 12 May 2013 - 06:42 AM

Take time to explore the project settings dialog sometime. e.g. Right click on your project in the Solution Explorer, and select Properties... There is a wide array of options there on how to tweak how your program is built.

In your particular case, to define the PSAPI_VERSION, you can go to Configuration Properties>C/C++... On the right side add PSAPI_VERSION=1 to the list of existing Preprocessor Definitions.
Was This Post Helpful? 1
  • +
  • -

#7 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 12 May 2013 - 09:08 PM

View PostSkydiver, on 12 May 2013 - 06:42 AM, said:

Take time to explore the project settings dialog sometime. e.g. Right click on your project in the Solution Explorer, and select Properties... There is a wide array of options there on how to tweak how your program is built.

In your particular case, to define the PSAPI_VERSION, you can go to Configuration Properties>C/C++... On the right side add PSAPI_VERSION=1 to the list of existing Preprocessor Definitions.

Thank you for your help, just sent it to my brother to see if he can get it to run.
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 13 May 2013 - 05:12 AM

If you have a relatively modern PC, you could use Virtual Box and install Vista or any other OS in it. If you are running Windows 7 or higher, you can use XP Mode, and not even have to get Virtual Box.
Was This Post Helpful? 0
  • +
  • -

#9 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 15 May 2013 - 10:14 AM

I am still getting the same error or xp and vista. I'm building with platform toolset "Visual Studio 2012 - Windows XP (v110_xp)" and "PSAPI_VERSION=1".
Was This Post Helpful? 0
  • +
  • -

#10 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 15 May 2013 - 04:22 PM

Did you recompile the entire Allegro library, or just your program?
Was This Post Helpful? 0
  • +
  • -

#11 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 16 May 2013 - 10:53 AM

View PostSkydiver, on 15 May 2013 - 04:22 PM, said:

Did you recompile the entire Allegro library, or just your program?

Ah, I've just been using the allegro binaries that are already compiled for windows from https://www.allegro.cc/files/
Was This Post Helpful? 0
  • +
  • -

#12 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 16 May 2013 - 12:42 PM

Do they have libraries that are built for XP rather than built for Win7?
Was This Post Helpful? 0
  • +
  • -

#13 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 16 May 2013 - 12:51 PM

View PostSkydiver, on 16 May 2013 - 12:42 PM, said:

Do they have libraries that are built for XP rather than built for Win7?

They have a MSVC 9 build so maybe that would work for XP?
Was This Post Helpful? 0
  • +
  • -

#14 Axman10  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 17-November 11

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 16 May 2013 - 12:59 PM

View PostAxman10, on 16 May 2013 - 12:51 PM, said:

View PostSkydiver, on 16 May 2013 - 12:42 PM, said:

Do they have libraries that are built for XP rather than built for Win7?

They have a MSVC 9 build so maybe that would work for XP?


Just tried it and I get all kinds of compiler errors. Would it be better to just compile it myself?
Was This Post Helpful? 0
  • +
  • -

#15 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3629
  • View blog
  • Posts: 11,320
  • Joined: 05-May 12

Re: K32GetFileModuleNameExA could not be found in Kernal32.dll

Posted 16 May 2013 - 02:05 PM

Compile errors? Did you mean link errors?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2