[vorbis-dev] win32sdk shared memory issue -- proposed change of code
Matthijs Laan
matthijsln at xs4all.nl
Thu Oct 18 08:19:44 PDT 2001
On 18 Oct 2001, you wrote in internal.mail.vorbis-dev:
>
> On 10/17/2001 at 9:46 PM Jack Moffitt wrote:
>
>>>> "Sleep" doesn't
>>>> exist on my system either (Clean Win2000sp2/msvc6sp5pp install).
> I could provide a 5 line C program which implements sleep, and is built
> as the first step of the build process.
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv){
STARTUPINFO si;
PROCESS_INFORMATION pi;
#define BUF_SIZE 1000
char cmdline[BUF_SIZE+1] = "";
int i, c=0;
if(argc==1){
printf("Usage: execandwait commands\n");
exit(1);
}
for(i=1;i<argc;i++){
if(strlen(argv[i])>(size_t)(BUF_SIZE-c)){
printf("Command line too long\n");
exit(1);
}
strcat(cmdline, argv[i]);
strcat(cmdline, " ");
c+=strlen(argv[i]);
}
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
if(!CreateProcess(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)){
printf("CreateProcess failed\n");
exit(1);
}
WaitForSingleObject(pi.hProcess, INFINITE);
return 0;
}
Matthijs
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list