Answer Questions
DCosta Working with ISequentialStream
I was trying to insert a string of over 8000 characters into a text column in SQL Express. I tested with the ISSHelper that comes with the AtlBlob on msdn ( http://support.microsoft.com/ kbid=190958&sd=msdn ) however only a is inserted into the column. Any ideas how can I insert a string of over 8000 characters in C++ using another method Or how can I get the ISequentialStream to work Thanks!!! Here is a full sample: http://support.microsoft.com/Default.aspx kbid=190958&sd=msdn ...Show All
JNG 'System.TypeInitializationException' occurred!!
Hello, does anyone know what's going on Somehow after I debug my project (without any error), when I run it, it comes with this error message. "An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module." I have no problem if I release my project and run it but just debug. Any idea Thank you!! Luis It's maybe beacuse of you are not initializing your object correctly. Try this: object myobject = null; Once it's initialized like a null, you'll be able to use it. Hope it helps... Regards. Sounds like you've got a problem with a static initializer in the assembly that just got ...Show All
LeeM i++ or ++i which one efficient
Hi, which of this statement is efficient i++ or ++i; i tried hard to find the answer but i am getting many explanations i am not able to find the correct answer. .help me manish sharma einaros wrote: The OP is asking which is faster: pre-increment or post-increment. You said that there is no difference between the two in a loop, and this is not correct. Consider for(vector<sometype>::iterator i = vec.begin(); i != vec.end(); ... ) . There will be a noticable difference between doing a pre and post increment on the iterator. The latter, i++ , will result in the iterator copying some internal data to a temporary, incrementing the actual data, then returning the temp ...Show All
yhal FTp Program
Hi all I had written a FTP directory listing program.Problem here is its working fine on my FTP server,but its not working working on client ftpserver i.e.,iam unable to get directory listing there.... I used following classes: class CFileFind; class CInternetSession; class CFtpFileFind; pf = is.GetFtpConnection((LPCTSTR)servername, (LPCTSTR)username, (LPCTSTR) pwd, portno, session_mode); although i have set session_mode both TRUE and FALSE, it still doesn't work or throw any exception Do you know what is the reason of the problem and How to fix this bug Thanks, This forum is meant for general IDE usage issues, not specific programming questions. For your issue I would go to the MSDN discussion groups. The people in the net ...Show All
JAul WDM Driver problem : How to do a non blocking IOCTL ?
Hi, I am programming a driver for the Microsoft Fingerprint Reader (because Microsoft does not distribute a SDK, so i made it... ). My driver works fine, i can get fingerprint. But now, i want to implement a capture cancellation. My driver works like this : 1 - Fingerprint Plugged => Initialisation of the Reader in the IRP_MN_START_DEVICE 2 - Get a fingerprint with a DeviceIOControl "StartCapture" => IRP_MJ_DEVICE_CONTROL => Starting capture and waiting for a finger Now, my DeviceIOControl is blocked until a finger is putted on the reader. So, i wanted to add a other DeviceIOControl "CancelCapture", but it doesnt work because the driver doesnt receive my "CancelCapture" IOCTL until t ...Show All
Linusguy Link error from Command Line: LNK1561
Hello All: I've looked at the online help pages for link errors when using the command line and still can't fix the error. I see the error relates to entry point not defined'. How do you define the entry point Thanks, PJM Luke- Thanks for the suggestion. I went back to the code and found a function main included. Here is the code: #include <iostream> int main() { std::cout << "This is a native C++ program." << std::endl; return ; } I input this at the command line: cl /EHsc simple.cpp And get this output: ... 32-bit C/C++ optimizing compiler info ... simple.cpp ... incremental linker version info ... /out:simp ...Show All
Sigurd DeMizar VC.Net. Linker Error
Hello I am getting this error app.obj : error LNK2019: unresolved external symbol "public: __thiscall Array<float>::~Array<float>(void)" ( 1 $Array@M@@QAE@XZ) referenced in function _main app.obj : error LNK2019: unresolved external symbol "public: __thiscall Array<float>::Array<float>(unsigned int,unsigned int)" ( 0 $Array@M@@QAE@II@Z) referenced in function _main my class implementation is undernerh, when i am using whole code in a one cpp file, its works fine, but when i break my class into .h and .cpp and then calling my Array class in the main routine of seperate cpp file, i got the baove liker errors, while compiliation is successfull. So pleaz advice me to fix this issue, i ...Show All
Noel Muhleisen Zipping files and folders
From a C++/CLI console application, I would like to zip up a group of files and directories. What library should I be using I recommend ZipArchive wrapper for zlib library. It's from artpol-software. http://www.artpol-software.com/ZipArchive/ hello Try to use GZipStream class in .NET library Also refer to System.IO.Compression namespace . regards rico ...Show All
Predator14567 IE & TABS - I do not get tabs!
Hello to all, I've found a problem and have no ideas how to sove it. The situation is the following: There is huge project, that was and is developing using MBCS encoding option. Setting option into Unicode takes approximately 5K errors and warnings. Some time ago it it bacame a task to have an ability to select unicode-named files. The projects uses standart CFileDialog and as it is compiled under MBCS, such a class uses OPENFILENAMEA struct. As the result, I cannot get normal filename. Of cource, I can use ::GetOpenFileNameW with OPENFILENAMEW argument. But in some cases CFileDialog is combined with another dialog to give preview option. In such case I need to write my own hook procedure to handle all messages. At this tim ...Show All
kcdclan Accessing Image resource (bitmap)
Hi, I tried but without success to access a bitmap file which I added in my application resource file as following: "resource.h" #define IDB_LOGOBWVISU 107 "app.rc" IDB_LOGOBWVISU BITMAP "Dessins\\LogobwVISU.bmp" How do I access this resource from within managed C++ code taking into account that I want to assign it to following Image object: System::Drawing::Image* Logo_Visu; Many thanks in advance, Stephane It sounds like you're using VC Express. You'll need to install the Platform SDK to be able to use LoadImage(), you'll find the instructions here... Hi again, Thanks for replying. I really appreciate. ...Show All
Nonu_k C++/CLI /CLR Managed Support in Native Library
Hi, I have a C++ project, a .dll project in Visual Studio 2005, which uses all native C++. I was able to compile the project with the /clr option (just /clr for common language runtime support). I am able to add the a reference to the dll with another C++ project, which is also compiled with the /clr option, and the entire application runs fine. The problem comes when I try adding the .dll project reference to a test C# project and add a "using MyCPPNamespace" to my C# class. I don't see the new C++ project namespace anywhere within my intellisense in the C Sharp project and I can't just add it as a using. I thought compiling my native C++ project with the /clr option allowed us to add references to these projects in other manage ...Show All
ivanw WaitForMultipleObjects doesn't work
Hello Everyone! Function WaitForMultipleObjects Requirements: Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95. But this function doesn't work in WinNT. Why Thanks in advance Vladimir Please show us how you use the function. GetLastError after CreateWaitableTimer and SetWaitableTimer returns 0. And, as I already told, in WinXp everything is fine, code works, but in WinNT I have problems and can not understand, why Viorel. wrote: Maybe you should replace this: LARGE_INTEGER check_elapse = {10000}; with this: LARGE ...Show All
Dan Lingman Assignment4P1 error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
I'm being proverbially raped by the concept of Pointers in C++. I have no idea what this error indicates in concern with my code, and I have very little to no idea what I'm doing with this code. Basically, I'm trying to create a matrix program that can dynamically store integers in a two-dimensional array. To make it dynamic I have to use pointers and create crazy arrays thereof but I can't seem to get it to work. Here's my code: #include"MyMatrix.h" #include<string.h> #include<iostream> using namespace std; MyMatrix::MyMatrix(int rows, int colums, int** matrixNums) { setMatrix(rows, colums, matrixNums); } MyMatrix MyMatrix::addMatrix(MyMatrix matrix) { int ** temp = new int*[maxRows]; &nbs ...Show All
Juliano.net LoadLibrary fails only in Windows Server 2003
Hi, I wrote a DLL to be called from a program that was written by somebody else. It works fine on Windows XP but not in Windows Server 2003 Enterprise Edition. I wrote another program that does nothing else than open the DLL with LoadLibrary() and then free it again. Works fine on XP, returns NULL in Server 2003 even if the DLL is in the same directory as the program calling it. I assume there is some security measure that stops the DLL from being accessed but some hours of searching in the internets about such measures didn't help. There are no software restriction policies defined and permissions are set for every group to be able to read and execute the DLL. Thanks for your help Paschalis ...Show All
kopo Is there a macro which converts a 32 bit signed integer to 64 bit unsigned integer ?
Hello All, Is there a macro which converts a 32 bit signed integer to 64 bit unsigned integer Thanks in Advance, CPPUser7 Coming to my problem. I have a function which currently returns a long and I have to change this function to return unsigned 64 bit integer so I have chosen ULONGLONG. ULONGLONG should be a typedef: typedef unsigned __int64 ULONGLONG; Try using "right click: Go to definition" on ULONGLONG to see if it is any different. This code compiled and executed without problems at /W4: int i1 = -1; unsigned __int64 i2 = i1; System::Int32 i3 = -1; System::Int64 i4 = i3; You are correct ...Show All
