Answer Questions
jerrykur LAN Voice Chat
Hi frens,I am designing a LAN Voice Chat server....Can ne1 please help me in designing the same \Ronak This issue is off-topic. Please reserve use of this forum for C++ language issues only. Thanks ...Show All
Key_46 Link errors, Help!!!
1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _main 1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _main 1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _main 1>Release_Win32/NVStorageInterface.exe : fatal error LNK1120: 3 unresolved externals I use the following functions in code, then I got the above errors RegOpenKeyEx() RegQueryValueEx() Thank you in advance!! According to http://msdn2.microsoft.com/en-us/library/ms724897.aspx , you need to link with Advapi32.lib. If th ...Show All
MDesigner ManagementObjectSearcher
why would the code below give me this: 'System::Management::ManagementObjectSearcher::ManagementObjectSearcher(System::String ^)' : cannot convert parameter 1 from 'System::Management::ManagementObjectSearcher ^' to 'System::String ^' String ^q = "SELECT Name from Win32_Service where Name = '" ; q += currentProcess->ProcessName; q += "'" ; ManagementObjectSearcher Searcher = gcnew ManagementObjectSearcher(q); do i really need to explicitly cast q and if so, is it the same in clr as it was in c++ so using the new 'hat' stuff it'd be something like: (System::String ^)q nm, i'm an idiot ;( it needs to be either: ManagementObjectSearcher ^ Searcher = ...Show All
Jessica Fisher Visual Studio Professional vs Visual Studio Express
My company spent a large sum of money to buy Visual Studio Professional 2005 about a year ago. I am not familiar with Visual Studio Express. Does Visual Studio Express have documentation on MFC Is it better than Visual Studio Professional Thank you. MFC is just a C++, Object-Orientated (mostly) wrapper around the Win32 Platform SDK which is almost entirely written in C. There are GigaBytes of information on the Win32 SDK on MSDN: here's what I was just looking at 10 minutes ago: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dllproc/base/setenvironmentvariable.asp No. Visual Studio Express does not support MFC. Is it better That's up to you. It's free, so ...Show All
moss define doesn't work with union?
The following code in .c file (compiled with visual studio 2005): #define TEST(name) union { int name; }; TEST(dummy); void main(void) { dummy = 1; } gives the following warning and error: .\main.c(89) : warning C4094: untagged 'union' declared no symbols .\main.c(110) : error C2065: 'dummy' : undeclared identifier What is going wrong PS The same code compiled with IAR AVR compiler works fine (for atmel processors) boothwine wrote: Would be easier if it had worked for Visual Studio as well. Now I gues I have to solve it with defines Well, C doesn't allow anonymous unions, so I'm afraid it's not the MS compilers fault. C++ does support it, but the standard requires such unions ...Show All
George2 Does VS2005 include Windows Installer?
Does VS2005 include Windows Installer If so, how do I run it to create an installation package for users to install or upgrade my products Simple Samples wrote: Note however that the VS 2005 local documentation is the same as the online documentation, or at least it is as far as I know. They are similar, but not exactly the same. You can tell this by searching for phrases in the on-line stuff in the local help files, and see that they're not found. Simple Samples wrote: It will probably help to spend some time becoming familiar with the documentation. I have spent a *lot* of time poring over MS docs. I would say I'm quite familiar with their style and shortcomings, but it st ...Show All
James Alexander ScrollWindow Problem
Hi, I have some problem in ScrollWindow function. My idea is to just scroll the part of the window. Like if window size is 500 * 500. I wanted to scroll horizontally from 200 * 0. ie first 200 pixels must be fixed and the other 300 units of window must scroll. My problem is that on the dialog, some child controls are also available. When i scroll on the towards, all child windows scrolls and hides up. when i scroll back, the child windows are not visible. Code Snippet: void CMyDlg::OnHScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar ) { switch( nSBCode ) { ...................... ....................... CRect rect(200,0,500,500); ///The rectangular region in which i wanted to do ...Show All
Perarg Addin to build vcproject source tree
Hi, I am trying to create add-in which will build all the vcprojects in my source tree. I have tried to use vcbuild through a batch file. It builds all the soution reading solution paths from registry very well. BUT I need to filter Error and Warining count per solution a separate text file. vcbuild generates big log file, it is very difficult to find out if any solution failed in build. Is there any tool which can be used to build a number of vcprojects in order and write collective log of error and warning in a text file I learned that you can add custom loggers and log the usefull information. I could use custom logger with MSBUILD. I didn't find any switch to add custom logger to vcbuild.exe. Thanks, Mac ...Show All
Elfreda How to test gcroot for null
I have class member in native class: gcroot< ManagedClass^ > ptr; I need to test whether this member is null: if ( ptr == nullptr ) // error C2088: '==' : illegal for struct How can i test it Take a look at this article: http://msdn2.microsoft.com/en-us/library/4ex65770.aspx The article states that nullptr can be used on internal pointers in the following manner: value class v{}; interior_ptr<v> ptr; ..... ......... ......... if(ptr == nullptr) { //do something } ......... That is if I have understood your problem correctly! How is this related to my question Found the answer here: http ...Show All
ChinaTiger VC++ 2005 redistributable
Hi, I'm trying to get an MFC application compiled with VC++ 2005 to run on a machine with VC++ 2005 express. There seems to be a problem with the manifest (which I don't fully understand despite reading the info on msdn). The original error in the event log when I tried to run it said Microsoft.VC80.CRT not installed so I installed the platform SDK and also copied over the atlmfc directory from the development to target machine. I also downloaded the VC++ 2005 redistributable and installed it. When I installed it, I didn't get any confirmation that the installation was successful, the installer appears to quit after displaying the progress bar. Is this the correct behaviour Now I no longer get any messages in the event log but when I try ...Show All
Pockey Compile Error List double-click to source code problem
After I compile my solution and have errors, for some reason when I double-click on the error or warning it does not take me to the source code line that is indicated. This had worked earlier in my solution development but now it does not. How did I break this, and more importatntly how do I fix it Thank you. Hello We may need some more information to work out what is wrong here. Basically when you double click on an “error” we just look at the text to find the source file name and line number and then jump to it. So does the error you are double clicking on have this information (some errors do not and if it does not then we cannot jump anywhere.) If it does then the IDE may be having tro ...Show All
magicalclick windows.h not found...
WOW, I can't believe this information isn't easier to find. I downloaded and installed Visual C++ 2005 Express, and then downloaded and installed the Platform SDK SP2. NOTHING WORKS! The Directories are not found and there is no apparent way to set them. Apparently users have found a hack to make it work, but this is crazy. It seems like the first Microsoft person to install this would notice that it doesn't work and would raise the flag to the appropriate people so they can take the steps to fix it for their users. Or at least document it on the very first page where it is downloaded, or the very first page of the documentation. A user shouldn't have to hit forums to find out how to make a product ...Show All
saghrouchni 'Parameter #2": Pointers cannot reference marshaled structures, Use ByRef instead - Help!!
I am using a third party API and I need to register a callback function that is embedded in an unmanaged structure. The callback function looks like this: typedef int(__stdcall *EventDetectedFunction) (long callback_parameter, const char* eventXML); The structure looks like this: struct Callbacks { EventDetectedFunction EventDetected_; long callback_parameter_; }; And the DLL function that sends the callback structure looks like this: int SetCallbacks( Hwnd handle, Callbacks* pCallbacks ); I am attempting to use this API in a windows form so that I can ultimately get the eventXML to display in a textbox. I can’t find an interop example that ...Show All
steve brsk Window from Console
I need to create and show a Window from a console application. To do that, I need to get the HINSTANCE of the application. What I need is the function that returns just that GetModuleHandle(NULL) If you are using MFC, you can call AfxGetInstanceHandle( ); function to get the instance of the class. Calling GetModuleHandle with a NULL parameter will return the HANDLE to the current module, which can be used as the instance. ...Show All
Dmitry Arefievich Debugging release version in VS2005
I am debugging a complicated piece of software which takes quite a long time to run until it reaches the point which I have to investigate. Running debug version from debugger is too slow as it takes up to few hours to run until I get it to the point of the problem. I tried to compile the release version and run it from the debugger. Interestingly I can only see some variables (usually local function ones) in the watch window. The "this" variable for some reason is always shown as NULL. I also can not see values of variables of functions that are deeper in the stack. And finally my debug visualizers do not work. Project properties of debug and release versions seem to be almost the same (obviously _DEBUG directive is missing in r ...Show All
