Answer Questions
Robert3234 Presenting a C++ library (.lib) for use in C# project
I have a collection of C++ programs and the C++ libraries they use. The libraries currently compile to a .lib format. Changing the project property to use a .dll results in multiple reference errors. Without having to go through the entire collection of source files, is there a way to create any kind of project in a .NET language that would provide a "wrapper" for the existing .lib files so that they could be used in that environment. Thanks. Thank you, AGAIN!! Thanks for the response Gordon. That post was very helpful. I am working from VS 2005 attempting to present a C++ API in .lib format to my C# project, to clarify. I seem have already run into another issue. The API I am using takes types (defined in other h ...Show All
r3n Strings in VC++
Can anyone help me understand strings in VC++ I just learned the basics of C++ from a book, teach yourself c++ in 21 days. I want to apply these concepts to creating a windows forms application in vc++, and i don't know where i should start. If anyone can point me in the right direction to learn the basics of vc++, as well as anything you think I should know, i would really appreciate it. There are many answers to the question of what is a string. In C, a string is a " char * ". C++ includes various standard classes that include std::string . The Windows operating system provides BSTRs , which are essentially the same format that VB uses. .Net has the other implementation of strings. 1. You can't ...Show All
Whoisit I don't want to implement Operators Precedence
Hi everyone I've just wrote a bigNumbers class, implemented with string class of C++ (the private member of my class is an object of <string> class), but I have two problems: The fist one is not that important, I don't know yet how to implement the / operator cause this class uses a stirng and it is not possible to use the * operator because this class is for integer numbers only! floating points not supported The second one is very important, I want to implement a function that reads some numbers and operators (including parenthesizes) and operate them with the correct Operators Precedence but I don't want to write the Operators Precedence by myself and look for a way that send this operation to compiler and find a way that ...Show All
Shirvo authentication question
hi all i have a gui....but i want that person will be able to use the gui only if his user name and password matches with which is stored in the system.....i have 2 edit box for username and password in the gui......so once the person presses authenticate button..........it shud compare it with wat is stored in system.......n if it matches then only he will be able to use other functionality.....so my question is how do i retrieve wat is stored in the system n compare it with wat user enters...... thanks kunal ya extactly.....i want them to authenticate their identity b4 using the application As cgraus points out, this is probably not the best way to validat ...Show All
realdealer Detecting website existance.
consider the following... IPHostEntry^ hostEntry = GetHostEntry( www.somewebsite.com ); Ok.. this works just fine if www.somewebsite exists, otherwise it throws a SocketException or something. With that in mind, I tryed the following.. IPHostEntry^ hostEntry = GetHostEntry( www.somewebsite.com/something ); Even if this site does exists, it ALWAYS throws and exception. How can i check to see if www.somewebsite.com/something exists Please restrict your questions for this forum to C++ language issues. This type of question would best be asked here in the MSDN Discussion groups. In particular here: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.networks ...Show All
l_steve_l Code generation bug when throwing exceptions in C++/CLI with optimizations.
While writing a C++/CLI project using exceptions I've encountered a bug( ) related to stack unwinding and deleting local variables in unreached parts of the functions on the stack. The following code demonstrates the bug. Please compile with Visual C++ 2005 with /CLR and /O2 flags set. In debug mode, the stack unwinds and the runtime does nothing with the local variable str . In release mode, the runtime attempts to destruct str , even though it has not been used. A workaround which in some cases appears to work is to declare str in the scope of the function. In our case this would be very inconvenient. Has anyone experienced something similar We could not find anything on MSDN or on Connect. Output in debug mode: Main test functi ...Show All
m_meuse19 How can I set the Application Icon in Visual Studio 2005
I am using Visual Studio 2005 Pro. I want to set the application icon for my Win32 exe. This is the icon that appears in the windows explorer next to the name of the application when it is viewed as a file. The logical place for this setting would seem to me to be to select the "solution" and then project properties and then look under Common Properties, but when I do this I see only a single entry "References" when has a bunch of empty reference lists and no obvious place to add an icon reference. I have examined I think every single property under the Configuration Properties for the solution and not found an entry for an application icon. I have already added 16x16 and 32x32 resources to the solution but cannot figur ...Show All
SalmonCreekGames Errors adding /clr to my ATL Service project (a COM exe)
Hi there, In VS2005, I created an ATL Service project for rebuilding a legacy COM server using new ATL features. I later added /clr, trying to bring .NET stuff in to my C++ code. But this caused the accompanying PS project fail to compile. According to the compiler, the offending code is in atliface.h: the compiler can't understand the ATL namespace when compiling xxx_p.c. I found the compiler is happy if I switch the namespace off by adding a check, #ifdef __cplusplus, in atliface.h. But this modifies a "standard" include, making me scatch my head. Was there something wrong Any idea Is new ATL fully compatible with VC++2005's c++/cli Thank you, Henry I resolved this problem by forcing the file to be ...Show All
Loopsludge Make QuickWatch window resizable
Please, make the QuickWatch window resizable. With long variable names or values, it is impossible to read. A related improvement would be to set the column widths to match the column contents. This wouldn't solve the long width problem, but would help. Just go to the bottom right corner, there is a "gripper" you can use to resize it. OK, then, how do you resize it Dragging on the edges doesn't do anything. I deleted my post since it was wrong in such case. Thanks Ted! Thanks, Ayman Shoukry VC++ Team The Quickwatch window *is* resizable in VC 2005 (what this forum is meant for). In VC6 it was not. ...Show All
Kalaivani Prakash _except_handler4 gone on x64?
Hello, i'm trying to port an 32-bit app to x64 but it seems the default c exception handler isn't available on x64, so the code below compiles/links fine on win32 target, but i get this linker error: error LNK2019: unresolved external symbol _except_handler4 referenced in function wmain when compiling for x64 #include "stdafx.h" #include "windows.h" #define VC_HANDLER _except_handler4 //C's default exception handler EXCEPTION_DISPOSITION VC_HANDLER( struct _EXCEPTION_RECORD *ExceptionRecord, void * EstablisherFrame, struct _CONTEXT *ContextRecord, void * DispatcherContext ); int _tmain(int argc, _TCHAR* argv[]) { void * cpp_hdlr = VC_HANDLER; return 0; } Ah, looking thro ...Show All
Ajeeth Kumar lib allways recompiles from scratch
Hello! From existing c++ sources (linux sources) I have created a project to make a static library. The project was initially empty and I have added all cpp and hpp files to different filters which correspond to the subdirectories of my already existing sources. I have not used any directories created or supplied by VS. Now when I build the lib, it allways recompiles all sources from scratch, ignoring any previous builds. Any hint of what is going wrong rolfB Hello Re: lib allways recompiles from scratch We need some more information before we can help, for a start what settings are you using on the project. Thanks Damien Maybe one of the source ...Show All
enric vives Strings
I have experience in Java and the use of strings, and wondered how to use them (if possible) in Visual c++. Is it something to do with LPSTR Could you point me to an introuductionary article or somethign please Mike There are several ways: 1. Create an array of characters. 2. Include the <string> header. 3. Use a variable of type char* (Same as LPSTR). 4. Many more. I would recommend choice #3. The string class in string.h has serious compatibility issues/flaws/etc. Arrays of characters can get messy. Choice #3 is your best bet. If I was to use option 3, how exactly would I do it would i just do something like char* string1 = "hello"; ...Show All
Matthew Roper Help me about "error LNK2019"
I met a link error while building a solution in vs2005 which is formerly builded in VC6,that is the error infomation: error LNK2019: unresolved external symbol "public: class EPropertyCombo * __thiscall EPropertyCombo::AddString(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" ( AddString@EPropertyCombo@@QAEPAV1@ABV $CStringT@_WV $StrTraitMFC_DLL@_WV $ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ) referenced in function "public: virtual void __thiscall CPageSSkuSettingData::GetProperties(class EPropList &)" ( GetProperties@CPageSSkuSettingData@@UAEXAAVEPropList@@@Z ) So how can I solve it Thank you very much! But it works well in VC6,an ...Show All
Rich Steck Getting the name of the current song in Windows Media Player with a C++ Plugin
I am not well versed with programming in C++ but the Windows Media Player SDK C++ 6.0 wizard was pretty straight forward. The plugin I compiled was a User Interface plugin and the only thing I want it to do is write the name of the current song to a text file so it can then be read by a custom mIRC script. The plugin is simply called 'NowPlayingTrack Plugin' and I have modified a section of the pre-created source. //WILL WRITE OUT SONG NAME void CNowPlayingTrack::MediaChange( IDispatch * Item ) { ofstream myfile; myfile.open ("G:\\example.txt"); myfile << "the name of the song will go here" << endl; myfile.close(); return; } The file "example.txt" is written out every time the media changes ( ...Show All
James Miles DDK functions link error (error LNK2019: unresolved external symbol )
Hello. I have new other link errors due to probably ddk functions... Please see below the link errors. I made sure that files containing the declarations are included in the project, but no definitions in the project because they are ddk functions. Also, I included <ntddk.h> and <header_file_having_declarations.h> in the file and set the path in Additional Include Directories as well as Additional Library Directories. What is problem I hope your help... Thank you. System Environment: Windows XP Prof. SP2 MS Visual Studio 2005 Errors: A few Warnings... ... Compiling resources... Linking... Detect.obj : error LNK2019: unresolved external symbol __imp__ZwClo ...Show All
