-
- LNK2001: using unmanangedC++ in manC++
by unsigned int
- 14 Replies
- Last post
by Mike Danes
- Hi, i'm writing a new user-interface for a small software-company. The old interface should be replaced by the new one, the "inner core" should stay. The old program was written in unmanaged C++, but now I'm writing the user-interface in C#, so I have to use class wrappers. While building the managed C++-project (in a solution with the unman. C++-projects) there a some errors. For examp
-
- Pointer troubles
by Hisham Aziz
- 8 Replies
- Last post
by carby07
- OK I am trying to use the built in functions from a library known as etSAPI, its an eToken Library.
Specifically the function I am trying to use is:
CK_RV SAPI_Server_Unblock (
CK_CHAR_PTR pPin,
CK_ULONG ulPinLen,
CK_VOID_PTR pChallenge,
CK_VOID_PTR pResponse
);
Parameters
pPin
[in] Pointer to the Security Officer (SO) PIN string.
ulPinLen
[in] Length of SO
-
- Errors with DirectX in visual c++ 2005
by WILLIAMXXX
- 12 Replies
- Last post
by WILLIAMXXX
- Hello,
I make games with directx and visual c++ 2005
I have creating a small game.
as I compiling the game then have I errors:
Error 1 error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW@48 referenced in function "long __cdecl InitDevice(void)" ( InitDevice@@YAJXZ) Game3.obj Error 2 error LNK2019: unresolved external symbol _D3D10CreateDeviceAnd
-
- Crashes
by dellthinker
- 4 Replies
- Last post
by Hugo Rumayor
- Hi all. I have a TCP program that crashes when a connection isnt made. One example is when i open it and dont allow the connection through a firewall it crashes in Windows. How would i go about making it try to reconnect every so often if a connection isnt established without crashing Thanx in advance!
-
- Transparent window without mouse events
by PrTaS
- 4 Replies
- Last post
by PrTaS
- Hi, I want to create a window that is transparent (have done) and all mouse events will go to the window (application) that is below it. I'm writing the application in C++ and windows API. How can I send all mouse events to another application Thank for any help.
-
- Color a progressbar: PBM_SETBATCOLOR seems not to work
by U412
- 9 Replies
- Last post
by Sahir Shah
- Hi everyone...
I use following code:
Code Snippet
COLORREF color1, color2;
color1 = m_ProgressGreen.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_ProgressGreen.Invalidate(TRUE);
color2 = m_ProgressBlue.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(0, 0, 255));
m_ProgressBlue.Invalidate(TRUE);
There is no effect, whethere i
-
- Iostream issue when upgrading from VS6 to VS .Net 2003
by Gary Chan
- 1 Replies
- Last post
by Jonathan Caves - MSFT
- Hi,
I have a lib file, which I don't have access to source code and was built with VS6. I want to link it in VS .NET 2003 but got a lot of error complaining about not able to resolve external reference on iostream library functions. I understand from MSDN that microsoft remove iostream lib from libcmt.lib starting from VS.NET2003.
Is there a way to still make VS.NET link my .lib file to old
-
- About CString
by YaelS
- 0 Replies
- Last post
by YaelS
-
- Problem in fread and fwrite function
by Dravid
- 5 Replies
- Last post
by Simple Samples
- Hi, In my project simply encrypt data using XOR operator ,Then write encrypted data in file using fwrite function in MFC. No problem in Decryption if successfully retrive data from encrypted file until EOF. But some time encrypted file automatically return EOF after postion of data retrive,This postion data also decrypted successfully. For example , File1:Input File size(6kb) FIle2:Encrypt File s
-
- worker thread slowed by MFC UI interactions
by solehome
- 5 Replies
- Last post
by solehome
- I create a SDI MFC program in which there is a worker thread to render a 3D scene. I found the rendering speed will be interupted and slowed by some UI interactions, e.g., moving the window by drag the window title, mouse move on some toolbar's buttons. However the program implemented by C win32 API has little performence decrease under the same condition.
Could you give some suggestion
-
- PRJ0002 Error result 31
by stanley0101
- 8 Replies
- Last post
by Thambidurai
- Hi,
I'm getting the following error message when I build my release version of the application " Project : error PRJ0002 : Error result 31 returned from 'c:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe" It never happenes when I build for debug version. Once on a blue moon, the build may be successul.
I have uninstall and reinstall the VS 2005 and it does not h
-
- How to change Static label text alignment at runtime
by Amr Ouf
- 6 Replies
- Last post
by Amr Ouf
- Please help me change STATIC label text alignment at runtime I have used the following but it's not working this->GetDlgItem(IDC_STATIC)->ModifyStyle(WS_EX_RIGHT|WS_EX_LEFT,WS_EX_LEFT,0); Thanks in advance.
-
- Problem reading stdout
by Boulderdude
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Hello Everybody,
What I'm trying to do is create a process (a perl script) and read the stdout as it comes into a text box. Here's my code -
Process ^myproc = gcnew Process();
ProcessStartInfo ^myProcessStartInfo = gcnew ProcessStartInfo();
myProcessStartInfo->FileName = "perl.exe" ;
myProcessStartInfo->Arguments = "abcd.pl" ;
myProcessStart
-
- error C3641 - invalid calling convention
by Toad62
- 7 Replies
- Last post
by Toad62
- Hi all,
I'm new to VS2005 C++ / .NET and I've inherited some code that requires porting to VS2005 C++ .NET. I get the following error when compiling with clr/pure:
error C3641: 'CWThread::Redirector' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe
The relevant offneding class code is:
//The method to cast the inheriting classe
-
- USA Daylight Savings Time (DST) Update
by Damien Watkins - MSFT
- 8 Replies
- Last post
by crescens2k
- Starting from March 2007, the Daylight Savings Time (DST) start date and end date for the United States will change. DST will start at 2:00 A.M. on the second Sunday in March and end at 2:00 A.M on the first Sunday in November.
The C Run-Time (CRT) performs its own time handling only when the TZ environment variable is set, or when an underlying OS API time call fails. If the TZ envir
-
- compilation error
by cisfreak2
- 1 Replies
- Last post
by Bite Qiu - MSFT
- I keep getting error C2470 ('looks like a function definition, but there is no parameter list; skipping apparent body') in Visual Studio 2005 and I don't know what I have done wrong. This is the C++ statement that keeps giving me the error: // function to retrieve the salary int Employee::getMonthlySalary { return monthlySalary; }
-
- Linker bug? data_seg(".CRT$XIU") not merged into other .CRT segments
by erikmav
- 2 Replies
- Last post
by erikmav
- Using the x64 cross-compiler running on x86, linker and cl.exe file version "8.00.50727.42 (RTM.050727-4200)", the following code that works in x86 with the x86 cl.exe and link fails:
#pragma data_seg(".CRT$XIU")
static int (*initptr)() = APreCppInitFunction;
#pragma data_seg()
The problem occurs because cl.exe seems to create the data_seg as a DATA segment type (in
-
- Debugging: Run-Time Check Failure #2 - Stack around the variable 'LoggerThread' was corrupted.
by Sam Hobbs
- 14 Replies
- Last post
by Tawhir
- I am getting:
Run-Time Check Failure #2 - Stack around the variable 'LoggerThread' was corrupted.
I have searched as much as I can for a description of how to diagnose, but I have not found anything. I don't know how to determine the specific address that is being corrupted. If I knew that, then I could of course set a breakpoint on the condition of that cha
-
- Using XMLFormatter to deposit MSMQ Body into unmanaged C++ class/struct?
by J. Kirk
- 2 Replies
- Last post
by J. Kirk
- I have a C# client sending a XML (loosely coupled data structure) formatted message to a server which then de-serializes it into a C++ managed class with an identical data structure. I need that same data in a C++ unmanaged class/struct and I am currently having to copy it member by member from the managed class to the unmanaged class. Anyone know if I can de-serialize it directly into my unmanage
-
- How do I call my function?
by Vhradice
- 8 Replies
- Last post
by Vhradice
- I am new to C++ but not to programming. I am trying to setup a test program using some Windows forms and controls. I create a text box and a command button. This give me a Form1.h file and a Very_Basic.cpp file. What I would like to do is click the button and have my code executed. I have discovered that if I put my function (My_Go_Click) in the .h module, it gets called. If I move it to the .cpp,
-
- class destructor not operated.
by FastCoder28
- 10 Replies
- Last post
by Simple Samples
- Hello,
I have a question about destructor in a class. In the below code I was expecting the destructor part of the code to be executed and the message printed out. However, I only see the constructor message. This is the output:
"We're in the constructor with arguments Press any key to continue . . ."
Why is the destructor message not printed
#include <iostream>
-
- Usage of DAO in a mixed (managed/unmanaged) C++ application
by marco.beninca
- 5 Replies
- Last post
by Ben Anderson MSFT
- Hi I need to use DAO objects in a mixed (managed/unmanaged) C++ application. I preceed as follow - Create a new CLR console application - Set the Commom language support to /clr - Set the use of MFC as shared DLL - Compile my Hello World program At this step everything works fine Then I insert #include "afxdao.h" inside my main cpp module. I don't call any DAO function or object! I can c
-
- A very strange exception problem
by hipswich
- 14 Replies
- Last post
by hipswich
- Hi all,
I have a very weird problem and hope someone can shed some light on this. I have two statements if (A == B) and if (bFlag) that seem to be fine no matter whether I check them separately or their combination. Int the the following code, exception is caught only at location 5 repeatedly. No exception has ever been caught at other locations. I cannot make any sense out of it.
-
- Turning off _CrtDumpMemoryLeaks()
by Chris.P.J
- 3 Replies
- Last post
by Chris.P.J
- We have a fairly large old native application (6 million lines of code, 200+ DLL's), and I am having a problem with _CrtDumpMemoryLeaks () getting called when the application exits. I actually want to *prevent* _CrtDumpMemoryLeaks () from dumping memory leaks to the debug output window.
What happens in our application is that we explicitely unload all the DLL's that we explicitely loa
-
- Compatibility between FileStream & fstream
by stn
- 2 Replies
- Last post
by stn
- Compatibility between FileStream & fstream
I write in write and read binary file. Both work well to read its own binary file. However, if I read a binary file generated by fstream in visual c++ 2005, I cant get the proper data. Is there a way to convert fstream type binary data into FileStream data
I need to read fstream binary file, as the image processing library i used is i