Question:
I am trying to use GetPrivateProfileString to access INI entries in a INI file using Visual Basic 4.0. Whenever I try to run my program it produces the error “Cannot load DLL.” Can you please help me with this problem (btw, this program worked fine under VB3.0.
Answer:
You need to use the new function…the declare statement is slightly different under VB4/Win95…I believe the function originally came from the kernel library…now it is in kernel32. Just change the library reference in the API call, or get the new declaration from the API Text Viewer program.Crescent Software put out a great wizard that helps transition your code from v3.0 to v4.0. I’m not sure if it’s still available from them but it’s certainly worth a check of their website. The wizard is free.