Software Development Network Logo
  • SQL Server
  • IE Development
  • Game Technologies
  • Windows Forms
  • Smart Devicet
  • SharePoint Products
  • Visual Basic
  • VS Team System
  • Visual FoxPro
  • Audio and Video
  • .NET Development
  • Microsoft ISV
  • Visual C#
  • Windows Vista
  • Visual Studio

Software Development Network >> Visual C++

Visual C++

New Question

Combo Box Question
Linker problem 4248 (probably beacuse of unmanaged c++)
Facing a problem with editing a text file using C++
List Box Error
Problem with example for __asm calls
How to change data type from TCHAR * to LPWSTR?
Dependency UML Design
ReadProcessMemory crashes computer
fwrite in binary mode
error C2064: term does not evaluate to a function

Top Answerers

Nick Port
barkingdog
Esenthel
robben07160
ECHS BACHS
einstine98
Crazy Engineer Kid
Amde
kilaj1
fulish1
sitemap
Only Title

Answer Questions

  • xicogoes Conversion Question

    Hi Folks; I'm running a WMI query to get the sizes of the disk drives in a computer. The result of course is a large number but I want to convert that number into a nicer format (i.e. 80G). So this is what I have thus far: oid GetWMITotal(HRESULT hres, IWbemServices *pSvc, char * sQuery, LPCWSTR sCol, char * data) { _variant_t varData; IEnumWbemClassObject* pEnumerator = NULL; ULONG uReturn = 1; IWbemClassObject *pclsObj; char cSuffix; int iStringOp = 0; hres = pSvc->ExecQuery( bstr_t( "WQL" ), bstr_t(sQuery), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uRetur ...Show All

  • Schnoogs ATL IDispEventSimpleImpl reverse order bug still present in VC++ 2005 ????

    I'm cross-posting my question to this forum (original here : http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1173728&SiteID=1 ) as it seems that ATL is also mentionned here. Sorry, if it's a bad practice ! I'm currently implementing an event sink with IDispEventSimpleImpl. I have the same problems than the ones described in KB288724 ( http://support.microsoft.com/kb/288724/en-us ), I'm receiving arguments in reverse order. What is confusing me is that this rather "old" knowledge base article applied only to Visual C++ 6.0. By looking into atlcom.h from VC++ 2005, it seems that IDispEventSimpleImpl::InvokeFromFuncInfo is the one described in the workaround section of KB288724, but I'm not sure with IDispEventImpl: ...Show All

  • Trashey How to trap all exceptions?

    Due to bugs in my code, users experience crashes. When this happens, they get a window saying "<MyApp> has encountered an error and must close", and offers to send a report to MS. I want to have my pgm get control when one of these errors (such as an access violation) occurs, so I can create and store my own report. How can I do this I tried _set_se_translator (complied with /EHa), but this did not work, at least when I run the pgm in the debugger. If I run the pgm without the debugger, I get a JIT debugger dialog. Exceptions are for reporting unusual conditions which are expected under unusual, but foreseen, circumstances, such as file not found, out of memory, etc. An access vio ...Show All

  • Helen54999 F1 help context bugs when App is starded from Createprocess()

    Hi , I've created an application in which I implemented F1 help context. Everything works well when the application is launched by mouse (chm help files deploy well when I hit F1). But when the same application is launched by Createprocess( ), the F1 help context stops working (nothing happen anymore when I hit F1). I suspect that CreateProcess makes the child application loose his help context. But I haven't yet found the way to solve that . Does someone has a solution for that Thanks. Nikita, this forum isn't really the best one for deeper issues such as yours anyway. Maybe the people in the Win32 kernel newsgroup might be able to help: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.pub ...Show All

  • Jassim Rahma input

    How could I make a hidden program, that gets input from keyboard Develop a windows service(runs in background) and hook the key board in it. Thanx&Regards, Ch.T.Gopi Kumar. Hi fighter, Have u finished implementing ur requirement If so, could you please post ,how did u do that thanx in advance, Ch.T.Gopi Kumar. Please elaborate more. Thanks, Ayman Shoukry VC++ Team ...Show All

  • Michael Pritchard What #include<file> is necessary for using namespace System;?

    The Visual Studio 2005 MSDN Help Search doesn't explain the prerequisite #include<file> needed before the System namespace can be called, for example, in the case it were needed to execute the following statements: using namespace System; Console::Clear(); Does anyone know this necessarily perchance Thanks. There is no include file you need to include System into your application. However, you need to reference the System.dll. Y2Y, I keep getting a blank form with no sign of a .net tab when I hit References... Rightclick on your project in the solution explorer. Select "References..."->"Add new reference..." in .Net tab find S ...Show All

  • vidhyaprakash Finding Cause of System Reflection Error -Multithreading

    When a thread fails to obtain a shared resource and the program crashes during debugging, how can you know what the resource was that couldn't be accessed or where it derailed As it is, the Call Stack doesn't tell  me anything useful, and I just have an unhelpful message about a System Reflection Error.     A.Russell wrote: Is there anything that can be set to notify of errors in the background thread, and to say which shared resource couldn't be accessed e.g. The background thread tries to access sharedVariable, but can't. How can I know it was sharedVariable that it tripped on With multi-threading in general, this is left up to the implementer, and the act ...Show All

  • Osmose1000 F1 Help in Visual Studio 6.0

    Hi, I am using visual c++ 6.0 and MSDN Visual Studio 2005. I want to link the MSDN to visual c++ 6.0, i.e. if i press <F1> in visual studio 6.0, it should automatically invoke msnd. Any thoughts. thanks, VSAT Hello Re: F1 Help in Visual Studio 6.0 Such questions (on VC++ 6.0) are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 For such issues please use an appropriate newsgroup, potentially one at http://msdn.microsoft.com/newsgroups . OTP Thanks Damien There's no way to do this natively (since Octobe ...Show All

  • volleynerd I need to wrap a struct in .net that is used from a c dll

    Ok I have a c dll that I have the header file to. I need to wrap it so that the the c style structs are : 1. Exposed to calling .net dll's (C#.net) 2. Types are 1 to 1 eg. struct S in the header needs to be available as struct S in C# or other managed languages. What I have now is a .net managed c++ wrapper that works fine. What I do not have is a translation for exposing the various pointers and references as managed type so the other languages can consume it without going to "unmanaged" code. The current code does NOT use .net clr extension so all of the current code is considered pure c++. All comment will be greatly appreciated. Some one else could probally give you bet ...Show All

  • pgago window pointer for a new window

    Hi, I have created a new window using the following method AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_NEW); How can I get a pointer to this new window What is the difference between a window handle and a window pointer Pritha AFAIK It will call CWinApp::OnFileNew function We can derive it and handle the same Ignore if you are already aware about that I have created a new window using the following method AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_NEW); Not at all. You have placed a message in the queue of the thread that created the main window. Hi, Thanks for replying. I tried what you had suggested. GetMainWnd()->GetActiveView() with this I was ...Show All

  • Mandragon Catalan's Triangle

    HI, can anybody help me to solve the Catalan's Triangle using C++ source. the details are The following is Catalan's Triangle: Here the entries are given by formula 1 1 1 Cnm =(n+m)!(n-m+1) 1 2 2 m!(n+1)! 1 3 5 5 1 4 9 14 14 1 5 14 28 42 42 For 0 < m < n 1 6 20 48 90 132 132 A characteristic of this triangle is that each element is equal to the element just above it plus the element to its left. T ...Show All

  • Thomas Wolfram infinite looooooop?

      hi i have this infinite loop     int array[5];  for (i=0;i<15;i++)  {    array[ i ] = 0; // here i becomes ZERO when i = 5  }     i am not understanding why this is infinite loop.. "i" is incrementing till 5 then suddenly it becomes 0.. and i mean i never goes beyond 5. so the infinite.. . can any one tell me why "i" becoming 0.. after 5 in the loop..   manish   Probably due to a corrupted stack. Your array will fit 5 entries, and you write across that. The for loop should stop at i == 4. i kno u hav given me the answer but i wanted to kno wat is dat " undefined " .. int array [ 15 ...Show All

  • TechNoFear string in C++

    Hi I have a C++ file that uses string (from Borland compiler). I want to use some functions in the file for another. I have to change it for Visual 2005.But when I added genlib in the header , there was a message : cannot open include file 'genlib': No such file or dicrectory there is a function in that file , I need a string input but the data I have actually are char type so I have to convert my data to string that I can use them as input of the function in the ancient file. Do u have any idea to change them string and char with genlib thanks for your advices. Hello I cannot quite understand your question here, are you rewriting the old file in Visual C++ or are you just ...Show All

  • Bill_W Socket port release

    I am using Socket programming to implement a listen thread on a machine. I am using port 80 for this application. I want my application to resume even if the network cable to machine is disconnected and connected back again. Now my application is running on a specific IP bound to a specific port. When network cable is disconnected and connected back again the IP address changes. What I am doing is closing the old listen thread (when reconnected) and opening a new one on the same socket connection (now having a new IP and old port - 80). It is working fine till my machine is allocated some same old IP. At this point when I am trying to bind to port 80 the error I am getting is 10048 (WSAEADDRINUSE) which means that the socket was not releas ...Show All

  • J.C. Coelho Which way should I go? C++ or C#

    I'm about to start developing a windows application which is currently in VB6 using an Access database. Which route should I take language wise, c++ or c# and what's the difference Native choice for database Windows application is one of .NET languages - C# or VB .NET. C++ doesn't have high level database access functions and doesn't give any advantage for deleloping such kind of programs. It will be a lot easier with C# (or VB .NET). Also depends on whether you're OK with the app. being managed or not, i.e., do you want to require the .NET runtime Most VB6 developers usually continue with VB .NET. Advantage of VB .NET is that there are lot of data ...Show All

95969798990123456789101112

©2008 Software Development Network

powered by phorum