microsoft.public.dotnet.languages.vc Archive - July 2002
Post a message to this list
Messages
Page: 12
Problems to pass HWND from c# client to unmanaged vc++ class via MC++ warpper (2 replies)
microsoft.public.dotnet.languages.vc
Hi I have unmanaged class in vc : class CDEI { private: HWND m myHWND; HWND m Server; public: CDEI(HWND hwnd); virtual ~CDEI(); BOOL Subscribe(const char* ServerName); BOOL Reconnect(void); }; I created managed class as a wrapper class : public gc class CDEINET { public: CDEINET(IntPtr hWnd); BOOL SubscribeNET(String *strServerName); BOOL ReconnectNET(); private: CDEI nogc *myDEI ; }; Implementing...
Printing one document at a time (3 replies)
microsoft.public.dotnet.languages.vc
Hi! Can anyone teach me how to print just one or two documents at a time from a list of 80 documents. It seems to me that the easyest way to print the entire collection is to make a for cycle that fills the textboxes and has a printDocument1.print() in the end. The problem with this is that i stay with 80 documents in the printer spool. Thanks in advance João Neto, Portugal
Problems to call a function of another class (2 replies)
microsoft.public.dotnet.languages.vc
Hello, I ve a problem. I ve the two files below. The first one ist a win32 application and I ve taken out one dialog. From this Dialog I want to call a funktion Main from another class, which is written in managed c . First I ve put this class into the win32 projekt and have changed the projekt properties to compile the whole with /clr. But when I compile the projekt I recieve the following errors...
Flags, Bitwise Bit Field, Enumeration, Error C2440 (2 replies)
microsoft.public.dotnet.languages.vc
I can't figure out how to use FlagsAttribute in my Enum. Here is my example. I think FlagsAttribute is what I am trying to get here, but Don't know for sure. Similar to FontStyle.. Or exactly like FontStyle anyhow. [FlagsAttribute] value public enum HostChanges : int {PresentationSpace,Cursor 1 1,Oia 1 2}; main: HostChanges changes HostChanges::Oia | HostChanges::Cursor; Generates error: C2440: 'i...
how use a System class in c++? (2 replies)
microsoft.public.dotnet.languages.vc
hi i'm a beginner using c and c# i have used the DateTime class in C# without problems, but when i do the same with c , the compiler says "Error C3255: can't dinamically allocate an object value type with members managed in the c heap (nogc)" (translated from italian, i don't know if it is right) what means? this is the string that i use:(in c# as in c ) DateTime myDate new DateTime(2002,9,23,12,4...
Printing one document at a time (2 replies)
microsoft.public.dotnet.languages.vc
Hi! Can anyone teach me how to print just one or two documents at a time from a list of 80 documents. It seems to me that the easyest way to print the entire collection is to make a for cycle that fills the textboxes and has a printDocument1.print() in the end. The problem with this is that i stay with 80 documents in the printer spool. Thanks in advance João Neto, Portugal
Can't pass an std::basic_string object from app written in MS VC7 to dll written in MS VC6 (7 replies)
microsoft.public.dotnet.languages.vc
I am using MS VC7 and trying to call into a dll written and compiled with MS VC6. The method I am calling takes a string as an argument, the wrapper for a basic string template class. My problem comes from the fact that the VC7 implementation of basic string has changed from the VC6 version to include optimization for short strings (the new VC7 basic string contains an internal 16 byte buffer wher...
MC++ - jagged arrays (2 replies)
microsoft.public.dotnet.languages.vc
After 30 frustrating minutes of trying everything I could, I have realized that you cannot have jagged arrays with MC You can simulate them of course, but that's not the same thing really!!! String* Multi[][] new String*[2][]; This won't compile!!! [ error C2691: 'System::String gc * gc[]' : invalid type for gc array element] Why is this, so????????? Nish
How to set an arraylist to an empti initial condition (3 replies)
microsoft.public.dotnet.languages.vc
Hi there, I ve my GUI, where I have a form to fill something in. As I press a Button, there will be created a file. As far as no problem. But if I press the Button a second time, he will create double entries. Meanwhile I ve found out, that the double entries are the Arraylists, because of the add function. What can I do, to set the arraylist first to an emptiy initial condition? Perhaps is this t...
Managed extensions with method parameter as reference (9 replies)
microsoft.public.dotnet.languages.vc
Hi! Sorry for this (maybe) newbie question but I can't get my wrapper code to work (compile). Main problem is how to pass an integer from C# to an unmanaged int reference. Haven't found out how to do this. Regarding the string it seems to work but maybe there are some better way. Example: Unmanaged C dll: class UnmC test { BOOL GetStatus(int id, CString &stat str, int &stat int); } Managed C dll: ...
help with activex controls in VC++.NET (6 replies)
microsoft.public.dotnet.languages.vc
i am trying to add an activex control to my vc .net project. in the earlier versions, i would simply go to projects components and gallery and add the activex control. this would result in the creation of the required classes and the header file based on the control. in vc .net i found that i could add an activex control from the toolbox while in the design mode in an mfc project. the control is b...
Error when compiling MFC samples followed with MS VisualC++ .NET (5 replies)
microsoft.public.dotnet.languages.vc
Hi all, This is my first mail to this group and hope someone can answer my question. I have MS Visual C .NET standard installed on my PC. When I try to compile the MFC samples I get the following errors error:C2065: 'ID FILE EXIT': undeclared identifier c:\Program\...\afxmsg .h error:C2065: 'ID STUFF GO': undeclared identifier c:\Program\...\afxmsg .h error:C2065: 'hIcon': undeclared identifier c:...
(.NET) C++ Events for VB .NET (2 replies)
microsoft.public.dotnet.languages.vc
Using .NET we trying to create our own DLL to sit in a namespace.. something like this: C Code dxx (namespace) fxx (object) add2 (method/function add's 2 numbers) sub2 (method/function subtracts 2 numbers) belowzero (event to fire when operation of of 1 of 2 functions above result 0 ) VB .NET import dxx .. .. dim x as new dxx.fxx() AddHandler x.belowzero, AddressOf NegSum dim h as int16 h h.add2(2...
work with an arraylist and a variable (6 replies)
microsoft.public.dotnet.languages.vc
Hello, I ve got an int variable und an Arraylist. I want to subtract the first element of the arraylist from my variable (number). I ve tried to: number number slave laenge Item[0]; it doesn t work: error C2113: ' ' : pointer can only be subtracted from another pointer What I have to change, to get this work? greatings Susanne
Problems to add a function (2 replies)
microsoft.public.dotnet.languages.vc
my Problem is, that I want to add a function. I have a variable, where the name of the file should be stored. void welche GSD Datei() { if (Convert::ToString (v module Item[0]) "750 333") MessageBox::Show(v module Item[0] ToString(), original); original S"WAGOB754.GSD";} else if (Convert::ToString (v module Item[0]) "750 833") {original S"WAGOB756.GSD"; MessageBox::Show(v module Item [0] ToString(...
multiple file selection (4 replies)
microsoft.public.dotnet.languages.vc
Hi There, I'm trying to make a simple windows application in VC , and I would like to include the ability to select multiple files in the open file dialog, but I can't figure out how. Can anyone help me? Thanks, Q
Intermittent problem creating strings using MC++ (2 replies)
microsoft.public.dotnet.languages.vc
We have a custom managed data provider written in MC . When using the data provider under ASP.NET or in classes that are remoted (hosted in IIS) we intermittently see the AppDomainUnloadedException. When it is used locally (in a Windows Forms app) the error does not occur. We have traced the exception down to a call to the System::Runtime::InteropServices::Marshal::PtrToStringBSTR() call, where a ...
save to bitmap (2 replies)
microsoft.public.dotnet.languages.vc
Hi, How can I save DC contents in a bitmap file? Thank you in advance.
Crypto API (16 replies)
microsoft.public.dotnet.languages.vc
Im trying to work with the crypto api in a prog. of mine, but i keep on getting errors... Configuration: simple1 Win32 Debug Compiling... simple1.cpp c:\program files\microsoft visual studio\vc98 \include\wincrypt.h(37) : error C2146: syntax error : missing ';' before identifier 'HRESULT' c:\program files\microsoft visual studio\vc98 \include\wincrypt.h(37) : fatal error C1004: unexpected end of f...
Using DataRow and old C libraries in managed C++ (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I have a huge amount of data that can only be accessed using functions in an old static C library. I want to expose these data in an ADO.NET DataTable by developing an Managed C wrapper class. So far I've been able to link with my old C lib and call the functions that return the data. The data is returned as a pointer and a type describing what kind of data the pointer points to. The pointers ...
passing interface as a parameter (2 replies)
microsoft.public.dotnet.languages.vc
hi i have a problem in passing an interface as a parameter to a property in a ATL class here is the code where i got an error. [propget, id(5), helpstring("property Columns")] HRESULT Columns([out, retval] ATLCollection::ICollectionPtr* pVal); The error is: c:\documents and settings\agent jix\my documents\visual studio projects\dbxmlparser\dbtable.h(26): error MIDL2025 : syntax error : expecting a...
MC++ issues - Callbacks with IJW (10 replies)
microsoft.public.dotnet.languages.vc
Dan Jump's post got me trying it out and I was puzzled to find that it fails. For the sample app I tried out, I tried to use EnumWindows from a managed app gc class CEnumWindows { public: static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM); void StartFinding() { EnumWindows((WNDENUMPROC)CEnumWindows::EnumWindowsProc,NULL); } }; This kept failing : ( The moment I removed the gc and made it an u...
Simple System.NullReferenceException question (2 replies)
microsoft.public.dotnet.languages.vc
Can anyone help me understand why I get this error in this function call? An unhandled exception of type 'System.NullReferenceException' occurred in x.dll void MyManagedClass::set DocValue(String* value) { int length value Length; char nogc* pszValue nogc new char(length 1); Here } Thanks, Martin
How to return an interface from a remote object? (2 replies)
microsoft.public.dotnet.languages.vc
Say I have an object A which has been remoted. Now say I have a function GetB() which returns an object of type B [B is a serializable object] From the client when I call GetB() I get this exception : Unhandled Exception: System.InvalidCastException: Return argument has an invalid type. at System.Runtime.Remoting.Proxies.RealProxy.ValidateReturnArg(Object arg, Type paramType) I don't have a proble...
char to string (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I have a char variable char text1[1024]; from a win 32 application and I want to transform it to my String variable String *first; something like that: first text1; but how ca I do it right? I have included in my win 32 application the dll mscorlib.dll . thanks in advance Susanne
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification