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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'GetOpenFileName' in WindowsXP vs Windows98

Status
Not open for further replies.

pavla

Programmer
Jul 10, 2000
32
0
0
GB
I have been using Window’s API common dialog function “GetOpenFileNameA” both from Access97 and Access2000 in Windows98. This function, as it was originally constructed, does not seem to work any more now I have changed to WindowsXP: the dialog box does not open at all.

What do I need to change/alter so that the dialog box open? (The original construction has been copied from Litwin-Getz-Gilbert’s Developer’s Handbook where it is used to open a dialog box if the structure-part of a database cannot automatically locate its data-part.)

Oh, I have called the “CommDlgExtendedError” function from the comdlg32.dll library while I was searching for the reason of the malfunction, and the function returned error value 2, but I do not know what it is. Furthermore, Access’s Err.LastDllError returned value of 87. I am none the wiser.

Thank you if you can help, Pavla.
 
After many hours of careful scrutinizing of much sample code I think I have figured it out: while setting up the data structure before the function (API common dialog function “GetOpenFileNameA”) is called, do not set any values for the CustomFilter (not even empty strings and zeroes) - just do not set the properties for the custom filter at all.

Pavla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top