https://bugs.winehq.org/show_bug.cgi?id=56467
Bug ID: 56467 Summary: Calling the GetPrivateProfileString interface failed Product: Wine Version: 8.0.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: csumushu@gmail.com Distribution: ---
I have written a C program to read an INI file, and I found that when a key name contains spaces, it can be read successfully on Windows, but fails to read when the executable program is run using Wine.
//------------------------Here is the code of the program----------------------- #include <Windows.h> #include <stdio.h>
#define MAX_BUFFER_SIZE 260
int main(int argc, char* argv[]) { char iniFile[MAX_BUFFER_SIZE]; GetPrivateProfileString("SYS_PARA_AREA", "VFSRootPath Item", "", iniFile, MAX_BUFFER_SIZE, "CONFIG.INI");
if (iniFile[0] != '\0') { printf("VFSRootPath Item: %s\n", iniFile); } else { printf("Failed to read VFSRootPath Item from ini file.\n"); } return 0; } //-----------------------------------------------------------------------------
//--------------------Here is the content of the INI file--------------------- [SYS_PARA_AREA] VFSRootPath Item=C:\ProgramData\ne1\ //----------------------------------------------------------------------------- On Windows, I compile an executable program using `gcc -o test test.c` and can read content normally. However, when I copy the program to Ubuntu and attempt to run it with Wine, it fails to read content.
Here is my environment information: Operating System: Ubuntu 23.10 Wine: wine-8.0.1 (Ubuntu 8.0.1~repack-3ubuntu2)
https://bugs.winehq.org/show_bug.cgi?id=56467
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #1 from Vijay Kamuju infyquest@gmail.com --- Also attach/paste the error output which you get on the console.
https://bugs.winehq.org/show_bug.cgi?id=56467
--- Comment #2 from laizhufeng csumushu@gmail.com --- (In reply to Vijay Kamuju from comment #1)
Also attach/paste the error output which you get on the console.
I'm very sorry, I made a mistake, this issue does not exist, please close this bug.
https://bugs.winehq.org/show_bug.cgi?id=56467
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Vijay Kamuju infyquest@gmail.com --- closing as requested by submitter
https://bugs.winehq.org/show_bug.cgi?id=56467
--- Comment #4 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=56467
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Austin English austinenglish@gmail.com --- Actually closing.