Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996



Building the Right Environment to Support AI, Machine Learning and Deep Learning

VB4 GetPrivateProfileString Problems

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.

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.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date