Answer Questions
SerialSeb Maximizing compatibility of VC++ 2k5 projects
Hello ALL, I've got following question: how can I setup up the C++ compiler in VS2005 to compile applications with compatibility across win NT family... all applications I build can run only on XP SP2, failing to run under Win 2k and XP without SP2 (throws errors like "Invalid Win32 application, please reinstall"). I actually need to run my applications on Win NT family or at least on Win 2k. I use clean C++ and Win32 functions (all compatible with lower Win versions). Thanks in advance. Without the full error message I can't be sure of what your problem is, but I can guess and make some suggestions. First off your problem might just be that you have not put the proper VS2005 DLLs on t ...Show All
Abhayc C++/C# InterOp and gacutil/regasm
Hello everybody, I am getting in the tough issue in my application. I hope I can get some advice from you. My application CatchAllMessages is mainly written in C++ and is used to catch messages from the internal network. I have many interfaces to display message data. But for some unlucky reason, we designed the new interface written in C# to catch a new message which has the different platform compared to messages caught in CatchAllMessages application. That's why I am using Interop to regsiter the C# DLL as the COM object. What I did was to create the DataWrapper.cpp class( in DataWrapper project ) which translates some basic data of the message, such as IPAddress and the content of the message. Then, I created the NewMessage. ...Show All
stombiztalker How to make stringstream that reads file content from a memory
Dear All, I have some C++ code which is autogenerated and reads data from a file (numeric values). This external data file "Weights.asc" is not big (11kb). The rest of the code is expecting a passed FILE* pointer in order to read properly the numeric values and compute stuff. This is real-time application and thus reading / writing files is strongly prohibited and time expensive. The data I have is of the correct type but it is in memory. Is there a way I can create a FILE structure and point it to the data in memory, or generally convert my in memory data to a FILE structure Here is a part of the code: FILE *loadStream = fopen("Weights.asc","r"); // Get the file version number weightFil ...Show All
John Gallagher LNK2001: using unmanangedC++ in manC++
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 example: Error error LNK2001: unresolved external symbol ___argv nafxcwd.lib and Error error LNK2001: unresolved external symbol ___argc nafxcwd.lib Another one: Error error LNK2001: unresolved external symbol __pgmptr db.lib [db is one of the old unmanaged C++-projects] The settings are the following: Linker->Input->Add. Dep ...Show All
stswordman How to assign hotkeys to buttons in VS 2005
Hi As the header says, I am trying to assign hotkeys to my buttons in VS 2005 (I am creating VC++ MFC Applications). In the older versions I used to put the '&' key before the letter eg e&xit to make the 'x' underlined and a hotkey. Can someone point me in the right direction please. I have trawled through help for over an hour and asked all my contacts! Thanks and regards in advance. I found this issue: I use & to indicate hotkey on, say a button text "&Browse" so that Alt+B is my hotkey. When I run the compiled program I don't see the underlined B until I tap the Alt key. Then the underline will appear. The hotkey is still fully functional. Using: ...Show All
itsRashmi DLL questions with Visual Studio using C++
I'm new to Visual Studio (I have VS 2005 Standard Edition) and I'm trying to learn how to code a DLL with some standard functions I use instead of including a cpp file into every project that needs it. Using the help I got a DLL to work with a Win32 project using __declspec ( dllexport ) and __declspec ( dllimport ). When I try a Windows Form Application I get lots of errors with the linker because of the CLR from what I can tell. I tried various things I read and could never get it to work. I decided to try my hand at a .def file and after reading up on how you write it up I have some questions. Can you export overloaded functions using a .def file From what I read I have to include extern "C" to keep C++ name mangling from ...Show All
Quilnux x64 application (VS 2005): error LNK2019: unresolved external symbol...
Hi: I am writing an 32 bit application using VS 6.0, compile and running successfully. However, when I open the same application with VS 2005 (Team Suite), compile the same application as x64 application for target running on x64 platform, it give me some error messages related to error LNK2019. I have changed the project properties -> configuration manager as x64, updated my own .lib files path at Additional Library Directories, but I get some error messages when i tried compile it. The error messages (LNK2019) show that it can't find the function that i am calling from my .lib files even though I already included .lib path on my project properties. I feel wierd because my application can compile very well in 32bit with VS 6.0 ...Show All
Jon Watte CreateProcess starting 16-bit Windows program problem
I am calling CreateProcess on a 16-bit Windows program, followed by WaitForSingleObject on the process ID with a timeout value. The 16-bit Windows program shows up in the Task Manager but never shows its initial screen until after the timeout occurs and I put up a MessageBox in my parent process asking the user if I should continue waiting for the child process to finish executing. If I double-click the 16-bit Windows program from Explorer the program puts out its initial screen immediately. Does anybody have any idea what I have to do, without putting up a MessagBox in the parent process, to get the 16-bit Windows program to execute and put out its initial screen immediately. Thanks for the pointer to t ...Show All
MF Recruit what is Deep Copy, shallow copy and bitwises copy.?
what is Deep Copy, shallow copy and bitwises copy. is there any difference between them... help me. manish Shallow copy means, just bitwise copy the objects. Deep copy means copying the content of the pointers present in your object i.e. class A { int* p; }; main() { A a, b; a = b; // now a->p and b->p will point to the same location since it is bitwise copy which is not safe } but if you define class A { int* p; int nSize; operator = (A& a) { if(p != NULL) delete []p; & ...Show All
Grant Jenkins Does Visual Studio 2005 provide code-template to easy programming?
Hello all: I would like to know whether or not Visual Studio 2005 provides code-template to easy programming. For example: In JBuilder If I input 'fora', then JBuilder may create some code-template-stub for me as for(int i=0; i<.....) { } Does Visual Studio 2005 provide similar functions Thank you -Daniel I don't believe VC2005 provide such facility. Feel free to log your suggestion at http://connect.microsoft.com Thanks, Ayman Shoukry VC++ Team ...Show All
Kunk Problem: call a managed DLL from native Visual C++ code in Visual Studio.NET
Hello, I am trying to call a .net class library from C++ code, but when I compile the C++ code, I always get the following error: error C2259: 'IFolderBundler' : cannot instantiate abstract class due to following members: d:\sources\1.4a_sources\bundlingbyfolder\bundlingbyfolder\debug\folderbundling.tlh(46) : see declaration of 'IFolderBundler' I followed the tutorial explained here: http://support.microsoft.com/kb/828736/en and I don't understand what's wrong in my code: c# code: namespace PdfBundler { /// <summary> /// Summary description for Class1. /// </summary> public class FolderBundler { // Interface declaration. public interface IFolderBundler ...Show All
knormann Problem with WinAPI MessageBox and Visual C 2005
Did Microsoft change something of the Win32 API in Visual C 2005 This code used to work on previous versions: MessageBox(NULL, "test", "test", 0); .... and now it returns this error: error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [5]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast when written like this: MessageBox(NULL, (LPCWSTR)"test", (LPCWSTR)"test", 0); .... it compiles but the text in the message box is corrupted. Can anyone please help me out with this thanks thanks a lot. For a second i thought my Visual C++ installation is corrupted ...Show All
Ralf Hedler DumpBin can't find mspdb80.dll
When I try to start DumpBin, either from the command prompt, or by clicking the filename in Windows Explorer, I get the message "The application has failed to start because mspdb80.dll was not found..." DumpBin is in C:\Program Files\Microsoft Visual Studio 8\VC\bin, and mspdb80.dll is in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE, and also in C:\Program Files\Common Files\Microsoft Shared\VSA\8.0\VsaEnv. What do I have to do to get DumpBin to operate The complete output was a dialog box containing what I said above, plus the sentence "Re-installing the application may fix this problem.". The identical message occurs whether I use the command line, or whethe ...Show All
MasterG How to get deskband interface?
____________________ | | | | | | | | | | deskband | HTML | | | | | | | This question does not contain the information needed for anyone to give any kind of feedback. Also, this is a C++ language forum -- not a place for general discussion or problems not related to the C++ language or its standard extensions. Direct a clarification to a suitable newsgroup at http://msdn.microsoft.com/newsgroups. See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=789657&SiteID=1 for more information. ...Show All
Brian OByrne How to return and capture an array of strings in a C DLL.
Hi all, I am working on VC++ 6.0 and VB 6.0. I have a function in my C dll that has to pass an Array of strings to the VB Application as input .These strings then have to be populated into a list box in my VB Application. Firstly, i am not able return the array of strings in my C DLL. Returning the array of strings is creating a problem. Its urgent. Thanks in advance. If your problem is just trying to get data from the c dll to VB,take a look at this: http://edais.mvps.org/Tutorials/CDLL/index.html If however you are specifically having trouble returning an "array of strings" to the VB dll, take a look at this: http://support.microsoft.com/kb/118643/EN-US/ However, as Nish has suggested, you may ...Show All
