microsoft.public.dotnet.languages.vc Archive - January 2003
Post a message to this list
Messages
Page: 12
Managed Extensions in MFC programs (2 replies)
microsoft.public.dotnet.languages.vc
#using system.windows.forms.dll using namespace System::Windows::Forms; .... .... catch(System::Exception* ex) { MessageBox::Show (ex ToString(),"Information",MessageBoxButtons::OK ,MessageBoxIcon::Information );//error } error C2653:"MessageBoxA":
using a wrapped c# class in a legacy vc6 app (3 replies)
microsoft.public.dotnet.languages.vc
Hi, i have made a communcation library in C# and my boss wants to use it in a legacy vc6 library as well Is mc worth investigating in for this scenario? if not, does anyone know of a solution? Thanks, Willem
"Error in Loading DLL" (6 replies)
microsoft.public.dotnet.languages.vc
This topic is related to the discussion of "Howto make a dll in VC 6 to be used in VB 6 and VB .Net" from 14 Jan 2003 6:02 AM. I crated a ATL COM DLL as described by one MS boffins. When i tried to add it as reference in VB I got error "Error in Loading DLL". This is what I did: Create ATL COM DLL Project: File New Projects Tab ATL COM Appwizard Project Name : MyCOMDLL Server Type DLL; Support MFC...
Help me! wrap unmanaged class with managed c++ (2 replies)
microsoft.public.dotnet.languages.vc
I met a problem when I tried to wrap unmanaged class into managed class with managed C . First, I built a static library, VcClass.lib, from the following source code with VC 6.0 : /* interface.h */ #include windows.h class CMyClassA { public: BYTE *m pBuf; int m bufLen; CMyClassA() { m pBuf NULL; m bufLen 0; } ~CMyClassA() { FreeBuf(); } HRESULT LoadBuf(BYTE *pBuf, DWORD dwBufLen); private: HRESUL...
migrating MFC application to Managed C++ (2 replies)
microsoft.public.dotnet.languages.vc
I am porting a small VC6 MFC MDI application to managed c . This application has 2 DLLs which has classes written in normal c i.e. not derived from MFC. And exe is an MFC MDI application. The code compiles using /clr option and produces (unmanaged)IL code. Now I want to change code in DLL files and EXE file to use managed C functionality such as gc etc. I can use managed classes in DLL using COM c...
Migrate COM automation server to Managed C++: Event (2 replies)
microsoft.public.dotnet.languages.vc
What's equivalent of "Event" in Managed C if I have to migrate those event firing methods from a COM automation server C program?
ArrayClasses (4 replies)
microsoft.public.dotnet.languages.vc
I am using Visual c .net. I want to create an array of strings. Mix them up randomly and print in the random order. I am new to vs. Can someone tell me witch method or which class will ccomplish this.
Conversion from System::IntPtr to HWND (2 replies)
microsoft.public.dotnet.languages.vc
I'm attempting to wrap the DirectX 8 API with C .NET, for use by VB ..NET. I cannot specify the HWND for the form to render to, because I cannot pass in a HWND data type, and cannot convert from anything to HWND, that I can find. I have combed the message boards and have found nothing applicable. If anyone could help me with converting the data types, It would be much appreciated. Thanks Dale
how to typecat in managed c++ (2 replies)
microsoft.public.dotnet.languages.vc
Hello, Does any one know the answer to the following question example: char test[100] ""; how do I cast test to unsigned char gc[] in managed C ? thankx in advance Raymond
How do I detect an Active DEBUGGER? (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I waned to know how do I detect if a debugger is working on my code. I have seen programs that do this before. Any Ideas gents? Rashad Rivera
Primary key (2 replies)
microsoft.public.dotnet.languages.vc
How can i determine whether a column in a table of a dataset is primary key or not. Thanks. Khanh Nguyen
Managed buffer alignment (5 replies)
microsoft.public.dotnet.languages.vc
Is there any way to guarantee the memory alignment of a managed array of bytes? I'd like to take advantage of garbage collection in the CLR, but my SSE2 routines require 16 byte alignment. I was hoping for something like this, but couldn't find anything: Byte buffer gc [] new Byte gc [1024]; GC::Align(buffer, 16); I know I could over allocate my buffers, keep them pinned for the duration of execut...
VC7: Injected "Invoke()" code appears broken (2 replies)
microsoft.public.dotnet.languages.vc
Hi, Since having defined " ATL DEBUG INTERFACES" in an attributed ATL project recently, all of a sudden many of my client test programs suddenly started crashing with access violations. At first I thought it must be some reference counting problem in my code, but I have since discovered what appears to be a fault in the injected code produced by the VC7 compiler for the Invoke() method of a COM ob...
Method not found for classes loaded from Assembly (3 replies)
microsoft.public.dotnet.languages.vc
I keep getting the errors Method not Found for some methods which belong to classes I loaded from Assemblies. I have rebuilt the entire solution over and over again, including physically deleting the old assemblies. However I am able to invoke the method via GetMethod and MethodInfo.Invoke. The Assemblies I loaded from are in a directory one level deeper than the exe file. Anyone has any ideas? Ch...
Finalizer/Destructor does NEVER gets called using MC++ (3 replies)
microsoft.public.dotnet.languages.vc
I've got some .NET 'wrapper classes', written in MC , that wrap some native C classes. Nothing special there. For some reason, the finalizer/destructor NEVER gets called for these classes. I've done every type of test I can think of and have yet to have the finalizer/destructor get called on my MC wrapper classes. The test is a C# client that creates 1 or more instances of my wrapper classes. Even...
Typesafe Collections from CollectionBase (2 replies)
microsoft.public.dotnet.languages.vc
I am trying to create a Typesafe collection inheriting from the CollectionBase class. However the compiler is throwing out a C3815 error. public gc class TestItem { public: int i; }; [System::Reflection::DefaultMemberAttribute("Item")] public gc class Test : public CollectionBase { public: void Add(TestItem* item) { List Add(item); } property void set Item(System::String* index, TestItem* item) { ...
PrintDialog ? (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I'm still trying to figure out why I get a System.ArgumentException from an DialogResult::OK on a PrintDialog(). Are there any variables in a PrintDocument I have to set, or something to do with my main program I need to change to get rid of this exception? I have been following code straight from the documentation and trying everything I know to try and can't seem to get this to work... All I...
Linklabel problem Object reference not set to an instance of an object (2 replies)
microsoft.public.dotnet.languages.vc
Get the error below. Had no problem doing this in VB.NET, and this is how it's shown in the help file. They really need to fix these help files. Anybody know what I need to add? System.NullReferenceException: Object reference not set to an instance of an object. at SharpApplication1.frmAbout.linkLabel1 LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e) in g:\csharpstuff\sharpapplication1\...
Using MC++ UserControl from Visual Studio IDE (2 replies)
microsoft.public.dotnet.languages.vc
I have been trying to write a .NET control using Managed C , but I can't seem to be able to use it from the Visual Studio Toolbox. To simplify things, let's consider the simplest control possible: a public class derived from System::Windows::Forms::UserControl that implements only a constructor. I implemented such class in both MC and C#, let's call each CppSimpleControl and CsSimpleControl respec...
Problems with MD5 Cryptography (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I've been trying to use the MD5 cryptography class that comes with .Net Framework to encode a string that is needed to communicate with the MSN IM's Notification Server. However, the encoded string always seem to be different from what the Server needs. I have searched around for possible reason, and found someone with a similar problem. For example, when we encode 1013928519.693957190mypasswo...
VC++ managed and WTL - do they works together ? (2 replies)
microsoft.public.dotnet.languages.vc
Greetings to all Did someone has a successful experience in conjunction of the codes employing all benefits of managed context and WTL classes. I tried with no success. I am getting IServiceProvider redefinition all time :) Thanks a lot for any constructive reply
Raising Events (2 replies)
microsoft.public.dotnet.languages.vc
Hi, My .NET usercontrol is raising an event and the client is trying to catch the event using COM interop and connection point model. Stepping through the code it looks like the advise sink is established fine but when the control raises the event I get the following exception: ************** Exception Text ************** System.NotImplementedException: Not implemented at System.RuntimeType.Invoke...
Application data (2 replies)
microsoft.public.dotnet.languages.vc
I'm writing a C# WindowsForms application. I have some application data that I would like to make available to all my forms and other classes within my app information such as the current user profile, exception handling directives, etc. Back in MFC days, I would stick application wide information in the CWinApp instance and use it as needed. My question is how do I do this in the .NET world? I ha...
StringToHGlobalAuto (3 replies)
microsoft.public.dotnet.languages.vc
Hi, I'm trying to get a managed String to an unmanaged char* string with the source code from the MSDN lib, but my resulting strings have only 1 Char content. Has anyone a helpful idea? Christof LPCTSTR ManagedCSid::GetUnManagedString(String * s) { LPCTSTR lstr 0; try { lstr static cast LPCTSTR (const cast void* (static cast const void* (Marshal::StringToHGlobalAuto (s)))); } catch(ArgumentExcepti...
ATL Server: POSTing multiple values (6 replies)
microsoft.public.dotnet.languages.vc
This probably is more a scripting question, but I figured someone out there using ATL Server might have already run into this problem and come up with a solution. I need to POST via a form, multiple values. In my case, I have a list box, that needs ALL of its rows POSTed, not just the highlighted/selected row. It would be nice if there was a way to POST an array of some sort, but I have not had an...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com