Avatar of lambauto
lambauto
 asked on

Using VB6 application with Win32 API calls on Win 7 64-bit system

I am having difficulites installing and running custom VB6 applications on win7 64-bit system.
The application was built and deployed using package and deployment wizard.  It uses win 32 API calls to read an initialization file and logon to an odbc database.  The installation appears to go correctly but when running the application it does not seem to read the initialization file and errors ensue.

What am I missing in this scenario
Microsoft Legacy OSMicrosoft ApplicationsMicrosoft Development

Avatar of undefined
Last Comment
lambauto

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
eemit

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
lambauto

ASKER
The ini file is in the program files(x86)/appname/appname.exe  directory.
eemit

Hi lambauto,
according to microsoft:
"Applications should be installed to the Program Files folder by default.
User data or application data must never be stored in this location because
of the security permissions."

The best place to store application configuration data is AppData folder (CSIDL_APPDATA...).
Create subfolders below them for your data.
You'd first create a folder with your company name, then a subfolder below that
with the product name. You can create a further subfolder for each subsequent version.
Put your ini file in that folder.
lambauto

ASKER
Thank you for your help.  This is a really old application and the ini file was in the path deemed appropriate at the time it was written.  You were correct in that the ini file could not be written to by the kernel because of the new security.  I placed the application in a different location and everything went fine.

Thanks for getting me to think about the ini file it was the key.
Your help has saved me hundreds of hours of internet surfing.
fblack61