You're right. I've reread my message and I sounded like such a Troll. There are situations in which using globals is not a bad idea. If you have something like: static const std::string application_name = "MyApplication";
passing it as a parameter is counter productive. So this is a situation in which you SHOULD use globals. However, most times, passing variables as arguments rather than using globals is a better design choice.
eusto
Posts
-
CreateThread with more than one parameter -
CreateThread with more than one parameterTry avoiding using globals at all costs. There are very few situations in which you have to use global variables.
-
regenerate wrappers for ocx libraryThanks for the suggestion. Do you guys have any idea why removing does not work? Do you know where visual studio keeps this info? Thanks, Eugen
-
regenerate wrappers for ocx libraryHow can i get Visual Studio to regenerate wrapper classes for an activex control? The control has updated but removing it from my project and adding it back does not generate the wrapper classes.
-
0xC0000138: Ordinal Not FoundOk, at this point i'm almost sure this is a vendor issue because recompiling my application on the target machine gets rid of the problem. I'm now betting on a weird licence implementation issue. Thanks again for your help David. Regards, Eugen.
-
0xC0000138: Ordinal Not FoundThank you for your answer, Dependency Walker is cool, i didn't know about it. Unfortunately, there doesn't seem to be any missing stuff on that ocx. I've contacted the vendor and asked them about it Regards, Eugen
-
0xC0000138: Ordinal Not FoundHi, I'm getting "0xC0000138: Ordinal Not Found" when deploying an executable that uses an ActiveX control on another machine. I have no idea where to start debugging this problem. Basically, what happens is that the visual studio output window displays "Loaded (correct)path_to_ocx file" "First-chance exception at 0x7c964ed1 in project_name.exe: 0xC0000138: Ordinal Not Found." "project_name.exe: Unloaded 'path_to_ocx'" The problem is that this does not happen on the development machine Any kick in the right direction would be a godsend. Thanks
-
Why C++ doesn't use the parent's class function? (C++ question)just put that line in your B implementation and it should work
-
Why C++ doesn't use the parent's class function? (C++ question)assignment operator works like the constructor when it comes to inheritance. You should read more about this. Also read about:
using A<T>::operator =;
which should be placed in the declaration of B -
How to free LPTSTR varaiblesLPTSTR variables are actually TCHAR* variables and you should work with them just as if you would work with TCHAR*. SO yes, you MUST free the allocated memory
-
Getting response from aspx pageuse CHTTPFile and CHTTPConnection.
-
How to add copy and paste functionality for CListCtrlsee CWnd::PreTranslateMessage and use GetKeyState for VK_CONTROL to see if Ctrl key is pressed
-
Send request to open a http link1. '/' is not an escape character so your url should be "http://101.16.0.42/..." not http:////... 2. Depending on what that the script at that url does, what you're trying to do might or might not work. Read about the HTTP protocolhere in very simple terms, when using a http connection, you're making a request (that might contain some parameters - see GET/POST methods) and you receive a response - the html code that you see in your browser I hope this helps :)
-
Can Signnal'ed Event Generate a User MessageIf i understand your question, you should be able to intercept the event and generate the message yourself.
-
CString convert error in Embedded Visual C++_itot does not accept a CString as parameter. you have to pass a TCHAR* as the second parameter. Why don't you use CString::Format?
-
Send request to open a http linkSee CHttpConnection and the other classes that help you do this
-
enum in .c-filethat's not standard C.You have to also declare a variable
-
RasDial() howtoThanks man. I'll try to read further on this matter and i'll post my answer here
-
RasDial() howtoThe difference is in the way i specify the connection to use. I'm telling RasDial to use the strPredefinedConnectionName (ex: a connection named MyDialup that appears in network connections) from the specified phone book. I've read that in MSDN also but i couldn't find the dialog for this setting. Do you think that the blue screen error is caused by the fact that my default user does not have a phonebook configured?
-
RasDial() howtoYes, it is not returning. My whole computer dies. The fix for me is to use the phone book feature of windows:
RASDIALPARAMS rdParams; rdParams.dwSize = sizeof(RASDIALPARAMS); //set the szEntryName to an already defined connection lstrcpy(rdParams.szEntryName,strPredefinedConnectionName); //not using these features because they're already defined in that connection rdParams.szPhoneNumber\[0\] = 0; rdParams.szPhoneNumber\[0\] = 0; rdParams.szUserName\[0\] = 0; rdParams.szPassword\[0\] = 0; rdParams.szCallbackNumber\[0\] = '\\0'; rdParams.szDomain\[0\] = '\\0'; HRASCONN hRasConn = NULL; dwRet = RasDial( NULL, "C:\\\\Documents and Settings\\\\" "All Users\\\\Application Data\\\\" "Microsoft\\\\Network\\\\Connections\\\\Pbk\\\\rasphone.pbk", //the system path to the phone book &rdParams, NULL, NULL, &hRasConn );
It's a bit frustrating that i can't use this to work with "on the fly" dialup connections. The windows blue screen really scares me :sigh: