Ups
> Og hvordan laver man sådanne et kald ??
Kort og godt er det næsten lige som alle mulige andre funktions kald. Man skriver funktions kaldet med de paremetre der skal med.
Her Microsoft`s version af API- kaldet CreateProcess :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.aspListe med API kald se :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/functions_in_alphabetical_order.aspOg svar på dit sp ) Se
http://www-level3.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20688636.htmlhttp://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20708478.html"
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcess( NULL, // No module name (use command line).
"MyChildProcess", // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
ErrorExit( "CreateProcess failed." );
}
// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE );
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
"
eller
"
HINSTANCE hShell = NULL;
hShell = ShellExecute( hWnd,
NULL,
lpszFile,
NULL,
lpszDir,
SW_SHOWDEFAULT );
"
Håber dette kunne hjælpe. Her er brugt to API - kald. Nemlig "CreateProcess" og "ShellExecute". Du reagere på WM_RM........... og kopier filen over i det bibliotek hvor den skal være....
Janus S. Andersen
* Life is a dream in a programmers heaven *