Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dif. between Kernel32 and Win32API

Status
Not open for further replies.

mkendi

Programmer
Oct 21, 2000
82
TR
Difference between Kernel32 and Win32API

I was trying to implement faq184-1767 (How to stop users running my app twice); but I get the error message "cannot find entry point SHOWWINDOW in DLL" when I reach the declaration.
Then I changed the decralation from
DECLARE LONG SHOWWINDOW IN Win32API LONG, LONG
to
DECLARE LONG SHOWWINDOW IN Kernel32 LONG, LONG
Now I am able to pass the declaration.
But as soon as I start a 2th instance of my program, again I am able to pass the declaration but get the message "cannot find entry point SHOWWINDOW in DLL" as soon as I try to call the function ShowWindow().
So what's the point here?

PS: I'm using W2k SP4

Thanks in advance
 
Hi Chris!
Indeed, you are right. My problem is:
ShowWindow seems to be a Vfp KeyWord, and in my 'Beautify ..' I am changing all Vfp KeyWords to Uppercase.

Thanks a lot!

 
BTW: the difference between Kernel32 and Win32Api is that when you specify "Win32Api", VFP searches all the standard API .DLLs: (according to VFP help) <i>If you specify WIN32API for the LibraryName, Visual FoxPro searches for the 32-bit Windows .dll function in Kernel32.dll, Gdi32.dll, User32.dll, Mpr.dll, and Advapi32.dll. </i>

If you specify Kernel32, vfp only looks in that dll: kernel32.dll

Either way, the procedure name is case sensitive.



- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top