i'm a retard
forgot the { } brackets
![]()
aight trying to use CreateProcess() for a remote control plugin and it's erroring up the ying yang now and it USED to work, the complied dll still works but just can't compile
here's the code
And here's the error msg:Code:case RMCTRL_0: STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); // Start the child process. CreateProcess( NULL, // No module name (use command line). "\"C:\\Program Files\\Winamp\\Winamp.exe\"", // 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. return TRUE;
Code:Compiling... Winamp.c c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(643) : error C2275: 'STARTUPINFO' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\winbase.h(3818) : see declaration of 'STARTUPINFO' c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(643) : error C2146: syntax error : missing ';' before identifier 'si' c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(643) : error C2065: 'si' : undeclared identifier c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(644) : error C2275: 'PROCESS_INFORMATION' : illegal use of this type as an expression c:\program files\microsoft visual studio\vc98\include\winbase.h(234) : see declaration of 'PROCESS_INFORMATION' c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(644) : error C2146: syntax error : missing ';' before identifier 'pi' c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(644) : error C2065: 'pi' : undeclared identifier c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(647) : error C2224: left of '.cb' must have struct/union type c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(659) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct _STARTUPINFOA *' c:\documents and settings\bak\desktop\remotewonder\winampplugin20\winamp.c(660) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct _PROCESS_INFORMATION *' Error executing cl.exe.
I've been reading the MSDN pages and have taken code EXACTLY off their site and it errors.
I'm programming in VS6 on WinXP SP1
Thanks
i'm a retard
forgot the { } brackets
![]()
gets you every timeOriginally posted by freestyler
i'm a retard
forgot the { } brackets
![]()
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
yea i know, i hate stupid things like that!!
now if i can only learn how to read and write to a dialog box i'll be all set
freestyler,
for a simple read/write, try "GetDlgItemText" and "SetDlgItemText" ... Basically if you had a textbox called "IDC_TEXT1" and a string callad "lpszText" and the handle to the dialogbox was called "hWndDiag", it would look like this:
to get the text in the textbox:
GetDlgItemText(hWndDiag, IDC_TEXT1, lpszText, strlen(lpszText) );
to set the text in the textbox:
SetDlgItemText(hWndDiag, IDC_TEXT1, lpszText );
cheers,
GTC
What program are you using to write it in? I am learning C++ currently, and have been using the GCC/G++ 3.3 compilers and Pico as my editor. Nice and clean, and I can do it from anywhere![]()
1993 BMW 325is - 15.2sec
Make it easy on yourself and learn to use the vi editor. Saves a ton of time.Originally posted by SiGmA_X
What program are you using to write it in? I am learning C++ currently, and have been using the GCC/G++ 3.3 compilers and Pico as my editor. Nice and clean, and I can do it from anywhere![]()
90% Done
60W DC-DC & shutdown controller
Via C3 800, 512mb Ram, HDD 75GB IBM Deskstar, 5.6" In dash Dcustoms LCD w/ 3m USB Touch setup
Rockfors 400s 400W amp,2x 10" Rockford Subs, Sony CDX M730 Head unit
All in a shiny White 2000 V6 Mustang
Click here to visit my NEW PhotoAlbum
Yeah, vi is eliteBut I don't want to waste the time learning it.. It's what we use at work so I should learn it tho, damnit!
![]()
1993 BMW 325is - 15.2sec
yeah that's what i thought, must have an error elsewhere, silly windows programmingOriginally posted by GTC
freestyler,
for a simple read/write, try "GetDlgItemText" and "SetDlgItemText" ... Basically if you had a textbox called "IDC_TEXT1" and a string callad "lpszText" and the handle to the dialogbox was called "hWndDiag", it would look like this:
to get the text in the textbox:
GetDlgItemText(hWndDiag, IDC_TEXT1, lpszText, strlen(lpszText) );
to set the text in the textbox:
SetDlgItemText(hWndDiag, IDC_TEXT1, lpszText );
cheers,
GTC
ok here's what i have and it's not working:
Code:#define BUFSIZE 80 #define ID_NUM_0 1040 #define ID_NUM_1 1041 #define ID_NUM_2 1042 #define ID_NUM_3 1043 #define ID_NUM_4 1044 #define ID_NUM_5 1045 #define ID_NUM_6 1046 #define ID_NUM_7 1047 #define ID_NUM_8 1048 #define ID_NUM_9 1049 FILE *fp; int gFocusBoxState,gStopWatch,gResize,gVolume,gVolInc,gVer; char NUM_0[BUFSIZE],NUM_1[BUFSIZE],NUM_2[BUFSIZE],NUM_3[BUFSIZE],NUM_4[BUFSIZE],NUM_5[BUFSIZE],NUM_6[BUFSIZE],NUM_7[BUFSIZE],NUM_8[BUFSIZE],NUM_9[BUFSIZE]; ...... SetDlgItemText(hDlg, ID_NUM_1, NUM_1); SetDlgItemText(hDlg, ID_NUM_2, NUM_2); SetDlgItemText(hDlg, ID_NUM_3, NUM_3); SetDlgItemText(hDlg, ID_NUM_4, NUM_4); SetDlgItemText(hDlg, ID_NUM_5, NUM_5); SetDlgItemText(hDlg, ID_NUM_6, NUM_6); SetDlgItemText(hDlg, ID_NUM_7, NUM_7); SetDlgItemText(hDlg, ID_NUM_8, NUM_8); SetDlgItemText(hDlg, ID_NUM_9, NUM_9); SetDlgItemText(hDlg, ID_NUM_0, NUM_0); ......... GetDlgItemText(hDlg, ID_NUM_1, NUM_1, strlen(NUM_1)); GetDlgItemText(hDlg, ID_NUM_2, NUM_2, strlen(NUM_2)); GetDlgItemText(hDlg, ID_NUM_3, NUM_3, strlen(NUM_3)); GetDlgItemText(hDlg, ID_NUM_4, NUM_4, strlen(NUM_4)); GetDlgItemText(hDlg, ID_NUM_5, NUM_5, strlen(NUM_5)); GetDlgItemText(hDlg, ID_NUM_6, NUM_6, strlen(NUM_6)); GetDlgItemText(hDlg, ID_NUM_7, NUM_7, strlen(NUM_7)); GetDlgItemText(hDlg, ID_NUM_8, NUM_8, strlen(NUM_8)); GetDlgItemText(hDlg, ID_NUM_9, NUM_9, strlen(NUM_9)); GetDlgItemText(hDlg, ID_NUM_0, NUM_0, strlen(NUM_0));
ID_NUM_X are "Edit" boxes on the dialog box, NUM_X are just my global vars
GetDlgItemText & SetDlgItemText both don't seem to be working, the ini file that gets created isn't having anything wrote to it which would come from the dialog box
TIA
Bookmarks