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

Software Development Network >> Visual C++

Visual C++

New Question

Binary
/QIfist deprecated, but bad fp conversion still sometimes generated?
Problem with MmAllocateContiguousMemorySpecifyCache
fatal error LNK1313
Getting Hardware Serials
Convert System::String to Double in Managed C++
Non-Square MFC Dialog
ActiveX DLL project
Embed Excel (Or any file) as a Resource
DLL Project migrated from VC6 to VC8 crashes.

Top Answerers

sroughley
TerryDaichendt
tvenhaus
In Over My Head
wchedm
Tina Nielsen
jayakhanna
FranklinBAH
FergusLogic
RussP
X-Hive/DB
Only Title

Answer Questions

  • Spangltk moving to VS2005 : pb with an activeX (AccessViolationException)

    Hi, I have moved a fairly big MFC project from VS2003 to VS2005. It is almost working fine now. The project is 1 .exe and 12+ dll. The exe and 1 dll are compiled with /clr, the rest (including 1 activeX control) is still traditional MFC (no /clr). Now in a CControlBar, I used to use one ActiveX and it does not work anymore. If I remove it, the project launch properly. When I insert it in my CControlBar and then run, I have the follwoing message : "An unhandled exception of type 'System.AccessViolationException' occurred in crystal.exe Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This happens in occmgr.cpp, line 438 in COccManager::CreateDlgContr ...Show All

  • avaya12 OpenFileDialog and SaveFileDialog crashes windows application

    I built a simple windows application in C++ with the .NET framework (using Visual Studio .NET 2005). The application used to run fine (it opens the OpenFileDialog and SaveFileDialog properly), but after I added more (unrelated) features, when the application tries to display an OpenFileDialog or a SaveFileDialog, the application closes abruptly on another computer with no warning message , not even that annoying warning beep sound. However, the application "sometimes" ran properly for the computer on which the application was compiled. By "sometimes" I mean for some builds of the application. Builds of my application that crashes does so consistently.   Some more description: In earlier builds of my program, disp ...Show All

  • MrJP Can I use POSIX threads in a atl STA project

    I have a library which uses pthreads inside of it. Can I use this library safely in a single threaded apartment project. If I can't what are my options . I want to use this library for building a com component. Thanks So if I'm using a MTA istead of STA all these problems are solved. I'm I right Yes I want to use pthreads The threads waits and do exactly as required if I'm using only one instance of the control. If I'm using a second instance the second instance won't block. What can cause such a situation I wrote my component a little bit. This component use the C library to send HTTP messages. e.g. myComponent.Send("HTTP data"); Send() method uses the C library internally. The C library method should ...Show All

  • price1 How to create threadsafe application in VC++?Getting error "SystemExecutionEngine".

    I am developing an application in VC++.NET using Visual Studio .NET IDE. Application has a UI and worker thread. I am also using QF Framework. When application starts, it loads UI and starts worker thread. Worker thread deals with RS232 port. It sends/receives data over serial port. PC application generates requests at certain interval and writes it to serial port. On receiving response, worker thread updates it to UI control(RichTextBox). Application runs fine for 4-7 iterations and then fails with SystemExecutionEngine error .It runs for longer hours on certain windows machine and fails less than 4-5 minutes on some machine. When it crashes, it shows up in disassembly code at " NTWaitForSingleObj ...Show All

  • hrubesh Trignometric functions (with 'double' data type) are behaving differently in Visual C++ 2003 and 2005 versions

    Hi, We are working on a scientifical related product which is most sensitive towards mathematical functions (even 7 th decimal place chang can cause considereble differences in the output values). We’ve observed that the trignometric functions are behaving differently in Visual C++ 2003 and Visual C++ 2005 versions. We've recently upgraded IDE from VS2003 to VS2005 and compiled the unmanaged vc++ code in both versions. To explain this in detail, please consider the following console application and compile it in both 2003 and 2005 versions. // CosSinDemo.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <math.h> const float PI = 3.14159265 ...Show All

  • Bertrand Caillet Is there a way to create a dll in C++ without a def file and have it work for a Visual Basic Host?

    Is there a way to create a dll in C++ without a def file and have it work for a Visual Basic Host I narrowed the code down to just an attempt to write the value of the variable being passed to the dll function to a file. It mangles it somehow. Is there a trick to passing strings to a dll file One viewer wrote that you can't call C++ dll files from a vb program. Could that be true OK Mike, thanks It looks like it is possible using Alias keyword in VB. I don't have VB6 to test but seems to work fine in VBA: This is the VB part: Private Declare Function summer Lib "D:\Projects\Tests\Forums\geodb\debug\geob.dll" Alias " _summer@8 " (ByVal num1 As Long, ByVal num2 As Long) As Long Note the A ...Show All

  • ceedee WM_KEYUP event not working....

    I want to get extended key (i.e. Enter, Shift, Del etc) pressed in the EditBox. I have added WM_KEYUP event for that but that event is not called. I don't know why I don't want to create sub-class of Edit. Can anybody let me know what can be the problem My method is: void CTest_WinDlg::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default MessageBox("Key up called....."); CDialog::OnKeyUp(nChar, nRepCnt, nFlags); } Did you add a ON_WM_KEYUP entry into your dialog's message map If so and it doesn't fire that means the edit control eats those messages and you'll have to subclass the edit box to catch them. Or I guess you cou ...Show All

  • G. Dean Blakely /GS switch and lack of crash dump generation with Dr. Watson

    Hi, I encountered a strange phenomenon with the use of /GS switch. I created a Win32 console app and pasted code from MSDN example for /GS switch /////////////////////////////////////////////////////////////////////////////////////////////// // GS_buffer_security_check.cpp // compile with: /c #include <cstring> #include <stdlib.h> #pragma warning(disable : 4996) // for strcpy use // Vulnerable function void vulnerable(const char *str) { char buffer[10]; strcpy(buffer, str); // overrun buffer !!! // use a secure CRT function to help prevent buffer overruns // truncate string to fit a 10 byte buffer // strncpy_s(buffer, _countof(buffer), str, _TRUNCATE); printf(buffer); //<------- I ADDED THIS } int main() { // declar ...Show All

  • RibenaUser Linked list and pointers

    HI,     I want to create multiple linked lists. I want to keep the starting pointer of these linked lists in a 2D array. I am using the following code for adding nodes. It does not work out as I require. I am just wondering if I am working the right way with the pointers: struct PeelerNode{      float zLoc;      // some other stuff here as well      struct PeelerNode *next; };  typedef struct PeelerNode *PNPT;     class PeelList{ private :       PNPT imageBase[500][500]; public : PeelList ( int dummy){      for ( int y=0;y<500;y++){  & ...Show All

  • Wiegje Read text file to variable, write this variable to another file

    Hello, I am new to Visual Studio and c++. I am using native., rather than managed c++ (I think and hope). I am able to read data from a file, but when I then try to turn around and write the string variable into a text file, the written-to file appears to be empty. Here is an excerpt of what I'm doing: std::ifstream fileInput; fileInput.open("SymbolList.txt",ios::in); std::ofstream fileOutput2; fileOutput2.open("SymbolsOut.txt",ios::out); std::getline(fileInput,line); std::cout << line << "\n"; start = &line[0]; j = strcspn (start,str2); std::cout << "j = "<< j << "\n"; length = line.copy(buffer,j,0); buffer[length]='\0'; std::cout << "buffer ...Show All

  • KitGreen basic_ostream::write() formatting bug

    I called the basic_ostream<char> method write(const char_type*, streamsize); and the function seems to be formatting the data I'm sending it. In my case, I sent it a double with the byte values: 0x9d, 0x16, 0xe7, 0xc6, 0xb4, 0x0a, 0xb7, 0x41 but what ended up in my file was: 0x9d, 0x16, 0xe7, 0xc6, 0xb4, 0x0d, 0x0a, 0xb7, 0x41 Looks like the write function interpreted a byte of my double as a '\n' and converted it to a '\r' '\n' pair. This would be correct except that write is an unformatted output function and should not do any conversion - regardless of the open mode's binary flag. (see book "Standard C++ IOStreams and Locales - ISBN 0-201-18395-1", p51 for details on the C++ standard). Two action items ...Show All

  • Madhu Gandhi Calling the finalizer in C++/CLI Wrapper class for an unmanaged C++ class

    Hello, I am working on a project that involves wrapping a classic C++ class using C++/CLI so it can be used in a .NET environment. I found this article "The .NET Wrap" in NETTING C++ - here is the link: http://msdn.microsoft.com/msdnmag/issues/06/06/NettingC/ This is the problem that I have encounter: When I create a .NET object that is a wrapper of my unmanaged class if I just create the object and DO NOT do anything with it -meaning no member function of that object is called - then when I force a GC::Collect() the finalizer of my .NET object gets called. BUT if I make a call to any member function of that object and after that I force a GC::Collect() then the finalizer DO NOT get called. Can you please explain this behav ...Show All

  • Raihan Iqbal DAO failed

    Hi, I'm trying to compile a VC++ 6.0 project on VC++ 2005 Pro. But I got the following error at run time. It seems DAO failed on AfxDaoInit(). Anybody has a similar case DAO Call Failed. pCF2->CreateInstanceLic( NULL, NULL, guidEngine, V_BSTR(&varKey), (LPVOID*)&pDaoState->m_pDAODBEngine) In file f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\daocore.cpp on line 5692 scode = 80040155 Thanks for the reply. I just found out the issue was originated from an old hack about DAO 3.6. We did a "AfxGetModuleState()->m_dwVersion = 0x0601" as suggested by Knowledge Base article Q236991. But after I comment it out. I got DAO Call Failed. ::CoInitialize(NULL) In file f:\rtm\vctools\ ...Show All

  • vkarthik Separator in a context menu

    Hi all, How do I add and locate a separator in a context menu (of the mouse right button ) E.g. I wish to separate (between two lines) my own menu items (in the context menu) from all the others. Best regards. I had a little look into this issue yesterday, but couldn't find an exact c++ solution. If you do a search on google for adding a context button into Visual studio you shoud find sufficient information to allow you to proceed. As both VS and office use the same extensibility interface, the code should work for both. Within 5 minutes I found a c# and vb solution for adding separators ;p The problem has been solved! an item must be added with a BeginGroup ...Show All

  • xshua Why the size of a "Picture Control" window is not coherence with the resolution of monitor setting?

    I use MFC in VS2005. I set up a Doc/View (FormView) based application. I want to display two loaded images on the form pannel. The size of loaded image is 720*540 pixels. I put two Picture Controls on the form. I find it can only set to 320*240 pixels each in the resource pannel, but the resolution of my monitor is 1280*1024 pixels. So why this happen When I put mouse on the loaded image, how can I know the true coordinate of the mouse point in the image One additional info, I am sure one of newsgroup listed here has better fit regarding on your question, have a look at it. Please also note that such question is currently not covered in this forum's scope, see the scope . If you cannot find a more ap ...Show All

707172737475767778798081828384858687

©2008 Software Development Network

powered by phorum