[Erased By postee]
Printable View
[Erased By postee]
Nobody is likely to bother....
You come here expecting people to volunteer their time, when you explicitly state that you are not willing to have any curtesy (ie a minimal yest complete commented formatted code sample posted properly inside code tags)????
[Erased By postee]
I Copied and pasted your code into my compiler (VS-2008) it does not compile (Complete means a code sample that reproduces the error, minimal means no extranesous information)
Code:1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C2146: syntax error : missing ';' before identifier 'SaveFile'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C2065: 'HWND' : undeclared identifier
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C2146: syntax error : missing ')' before identifier 'progTab'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : error C2059: syntax error : ')'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(2) : error C2143: syntax error : missing ';' before '{'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(2) : error C2447: '{' : missing function header (old-style formal list?)
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C2146: syntax error : missing ';' before identifier 'DoFileOpenSave'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C2086: 'int BOOL' : redefinition
1> d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(1) : see declaration of 'BOOL'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C2065: 'HWND' : undeclared identifier
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C2146: syntax error : missing ')' before identifier 'hwnd'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(39) : error C2059: syntax error : ')'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(40) : error C2143: syntax error : missing ';' before '{'
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(40) : error C2447: '{' : missing function header (old-style formal list?)
1>d:\source\dyncondevcorp\corplib\source\clrhosting\nativelauncher\private\temp.cpp(65) : fatal error C1004: unexpected end-of-file found
[Erased By postee]
In SaveFile you have:
I could not help notice the unusual test you're making:Code:dwTextLength = GetWindowTextLength(progEdit[count]);
LPSTR pszText;
pszText = (LPSTR)GlobalAlloc(GPTR, dwTextLength);
if(pszText >= 0)
You should test dwTextLength, because GlobalAlloc will return a non-null pointer (even though not valid) when dwTextLength is 0.Code:if(pszText >= 0)
Another matter is debugging, that could help you a lot more than any of the comments here. Doesn't DevC++ supports it?
I strongly recommend using VC++ 2005 or 2008 Express Edition. It will make your life a lot easier, at least when it comes to development.
good luck!
COPY EXACTLY (and ONLY) what you posted into a new .cpp file. Feed this file to your compiler...IT Will not compile.
When you only post partial code (or when you include code that has nothing to do with the problem), then it becomes impossible to determine exactly what the problem is.
Even in your last post:
progedit could be garbage...Code:if(GetWindowText(progEdit[count], pszText, dwTextLength))
count could be garbage
count could be outside the valid range of progecit
pszText could be garbage
dwTextLenth could be garbage.
The is 5 potential errors (that are impossible to test, unless you minimized the problem down to a minimal compilable post) in a single line.
[Erased By postee]
[Erased By postee]
You could not have possibly pasted in the code that was posted inline...
The very first line is:
That line alone will generate errors as NO headers are included, so BOOL, HWND, and LPSTR are undefined...Code:BOOL SaveFile(HWND progTab, HWND hwnd, LPSTR pszFileName)
I have spend enough time...going to help others who can follow directions..
Perhaps someone else will have mercy.
Good Luck. :wave::wave:
You were useless.
Why, it's been kind of dormant since 2005. There are far better alternatives, even Microsoft Visual Studio Express Edition (which is free) and has IMHO, the best visual debugger for c++.
No, you are too hard headed. Do this and come back if you still don't get it to work:
- Download VC++ 2008 Express;
- Create a new project and import all your files;
- Make the necessary adjustments (if any) to get it to compile;
- Do some REAL debugging;
You can download VC++ from here: http://www.microsoft.com/express/vc/