Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7e264690
Commit
7e264690
authored
Apr 09, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Apr 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We don't need to dlopen the app module before the LoadLibrary().
parent
da7d5ac6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
21 deletions
+1
-21
winewrap.c
tools/winewrap.c
+1
-21
No files found.
tools/winewrap.c
View file @
7e264690
...
...
@@ -173,33 +173,15 @@ static const char *wrapper_code =
"int WINAPI main(int argc, char** argv, char** envp)
\n
"
"#endif
\n
"
"{
\n
"
" void* appLibrary;
\n
"
" HINSTANCE hApp = 0, hMFC = 0, hMain = 0;
\n
"
" void* appMain;
\n
"
" char* libName;
\n
"
" int retcode;
\n
"
"
\n
"
" /* Load the application's library */
\n
"
" libName=(char*)malloc(2+strlen(appName)+3+1);
\n
"
" /* FIXME: we should get the wrapper's path and use that as the base for
\n
"
" * the library
\n
"
" */
\n
"
" sprintf(libName,
\"
./%%s.so
\"
,appName);
\n
"
" appLibrary=dlopen(libName,RTLD_NOW);
\n
"
" if (appLibrary==NULL) {
\n
"
" sprintf(libName,
\"
%%s.so
\"
,appName);
\n
"
" appLibrary=dlopen(libName,RTLD_NOW);
\n
"
" }
\n
"
" if (!appLibrary) error(
\"
Could not load the %%s library: %%s
\"
, libName, dlerror());
\n
"
"
\n
"
" /* Then if this application is MFC based, load the MFC module */
\n
"
" /* FIXME: I'm not sure this is really necessary */
\n
"
" if (mfcModule) {
\n
"
" hMFC = LoadLibrary(mfcModule);
\n
"
" if (!hMFC) error(
\"
Could not load the MFC module %%s (%%d)
\"
, mfcModule, GetLastError());
\n
"
" /* MFC is a special case: the WinMain is in the MFC library,
\n
"
" * instead of the application's library.
\n
"
" */
\n
"
" /* For MFC apps, WinMain is in the MFC library */
\n
"
" hMain = hMFC;
\n
"
" }
\n
"
"
\n
"
...
...
@@ -223,8 +205,6 @@ static const char *wrapper_code =
" /* Cleanup and done */
\n
"
" FreeLibrary(hApp);
\n
"
" FreeLibrary(hMFC);
\n
"
" dlclose(appLibrary);
\n
"
" free(libName);
\n
"
"
\n
"
" return retcode;
\n
"
"}
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment