GetPrivateProfileString problem!

D

Domac

I need to read some configuration data from .ini file located at
Application.StartupPath location .


Here is code snippet :

Public Declare Unicode Function GetPrivateProfileString Lib "kernel32" Alias
"GetPrivateProfileStringW" (ByVal lpApplicationName As String, ByVal
lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As
String, ByVal nSize As Int32, ByVal lpFileName As String) As Int32


Dim File As String = Application.StartupPath & "\" & filename


x = GetPrivateProfileString("Configuration", "DestDbPath", "Error",
tmpString, Len(tmpString), filename)

What is the problem; Everything works fine on XP platform but when I deploy
application on Win98 platform i have problem.



File path is correct, file is correctly formated :

[Configuration]
DestDbPath = \\tlos-server\podaci\nucleus2002\Baza-proizvodnja.mdb
SourceXMLPath = c:\tlos\izdatnice
SkladIDs = 655
OJ = 11
User = Domagoj Kovaèeviæ


GetPrivateProfileString function doesn't retreive data for requested
parameter but fills string buffer passed as reference with "Error"
What to do??????


Is my API declaration correct , I have "googled" and realized that there is
problem with GetPrivateProfileString function , what is solution????
Win98 platform is mandatory!
I got about 25 stations with Windows 98!


Thanks a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Reading an INI file 18
How is it work? 4
use GetPrivateProfileString 2
GetPrivateProfileString 2
GetProfileItem. 7
GetPrivateProfileString 1
GetPrivateProfileString 5
GetPrivateProfileString 2

Top