microsoft.public.dotnet.languages.vc Archive - January 2002
Post a message to this list
Messages
Page: 1
Passing managed objects through non-managed exported functions (6 replies)
microsoft.public.dotnet.languages.vc
I am very impressed by the way you can mix managed and unmaged code. I have however stumbled on some problems to migrate a multi dll project to .NET and I am not sure that my work around is ok. First I noticed that you cannot keep a pointer to a managed object in an unmanaged class. Howver you can keep a reference to such an object. I can more or less imagine that it has something to do with a poi...
ATL::CHttpRequest::ClearFilesAndCookies or ClearHeaders? (3 replies)
microsoft.public.dotnet.languages.vc
In ATL Server Session Services, the documentation for both Beta 2 and RC1 state that you can call ClearHeaders() to clear the collection of HTTP response headers maintained by this object. But when compiling, I receive the following error: error C2039: 'ClearHeaders' : is not a member of 'ATL::CHttpRequest' Looking at the header (atlisapi.h); they don't do the same thing as ClearFilesAndCookies re...
CreateProcess to call cmd file and ping fails? (2 replies)
microsoft.public.dotnet.languages.vc
We have "ping n 5 machinename" in a .cmd file that is being called using CreateProcess. The cmd file runs correctly when run from a normal command prompt Under Windows 2000. When run using CreateProcess and CreateProcessAsUser it fails and says Unable to resolve machinename (hostname). It appears to be failing to Find the DNS, etc. Has anyone found the problem that we are experiencing? Any solutio...
System::String to unsigned char* (4 replies)
microsoft.public.dotnet.languages.vc
I already have portion of code that is in C. It uses pointer arithmetic on unsigned char*. I want to expose the code to C# etc. So I added a managed class in my C project. I need to be able to pass String object from C# to C and make the content of the String available as unsigned char* so the C code can use. Any idea on how to do this? Thanks in advance.
importing vb dll (6 replies)
microsoft.public.dotnet.languages.vc
I've already created a VB.Net dll using a project. Then on another project, I wanted to create a C .Net application that imports that VB dll and used whatever classes inside that dll. What steps am I supposed to take to in order to import it and use the classes inside the dll? I've tried adding it to the Project Properties, but I'm confused where to put it and it does not seem to work too. Please ...
Cannot access base method (3 replies)
microsoft.public.dotnet.languages.vc
Hi, I cannot access base method compiler says "error C2660: 'Test::m' : function does not take 0 parameters" on line marked /*2*/ (see below). Is there a compiler bug or I am doing something wrong? gc class TestBase { public: void m() {} void m( int i ) {} }; gc class Test : public TestBase { public: void m( int i ) {} /*1*/ void x() { m(); } /*2*/ }; I have to use qualifier super to call 'm' (out...
Additional dependencies don“t work? (3 replies)
microsoft.public.dotnet.languages.vc
Hi guys, Sadly, my dependencies problems are not over and now I m quite stuck with my MC DLL. My scenario is like this: I m developing on a WinXP machine with VS.NET RC1 installed. The problems I m having stem from an MC DLL that I built. This DLL uses unmanaged classes and these classes use a 3rd party lib. Some of that code is dynamically linked in and those DLLs are on a network share and are r...
Using __pin to pass pionter to managed object (2 replies)
microsoft.public.dotnet.languages.vc
All the docs I found on pin discuss using it to pin an object and pass a pointer to a member variable. But I can not figure out how to pass the entire object (in my case, as an argument to a callback function that take a void*) and cast it back to something useful on the other side: void stdcall MyCallbackFunction(void* arg) { MyClass pin* object reinterpret cast MyClass* arg; //ERROR C2440 object...
Dynamic arrays not really dynamic in managec C++? (4 replies)
microsoft.public.dotnet.languages.vc
Excited by the promise of "dynamic arrays", I wrote a bunch of code like this:: gc class MyClass { Object* array []; MyClass() { array new Object* [0]; } void MorePlease(Object* o) { array Add(o); // throws exception: Collection was of a fixed size } }; Did I misunderstand what "dynamic" means? How can I get one that is truly extensible? Thanks, Steve
C++ Web Service Client & Security (2 replies)
microsoft.public.dotnet.languages.vc
I used SProxy.exe to generate a web service client proxy file. Everything works fine until I configure the web service to use Windows authentication instead of an anonymous account. In C#, I had to set the credentials on the client side like this: Service1.Credentials System.Net.CredentialCache.DefaultCredentials; String OutString Service1.HelloWorld(); Without the first line, I connect anonymousl...
MSDN-magazine: managed C++ (4 replies)
microsoft.public.dotnet.languages.vc
There is good news: Microsoft guys are discovering templates! There's bad news also: they're still scratching the surface... Have a look at the following quote "This is necessary because standard C template syntax provides no clean way to specify static type requirements. For example, there's no precise way of specifying that a template argument should implement a given interface or be derived fro...
How do I use an old C++ Class with my new C# WebApplication project? (6 replies)
microsoft.public.dotnet.languages.vc
Hi! We're developing a Webinterface to an existing application. The key stone when communicating with the old system is to use their "buffer" class. The Buffer class is written in C (MS VC 6.0). How do I use this class in my WebApplication C# project? I can compile the buffer and associated files with .NET in a Managed C projected, but I don't know how to add them to my C# web application project....
Callbacks from unmanaged to managed code via interfaces (3 replies)
microsoft.public.dotnet.languages.vc
Suppose I have some classes in native C as follows : class IDataSource t // abstract { public: virtual int GetLength ( ) 0 ; virtual double GetValueAt ( int ) const 0 ; } ; class SumCalculator t // concrete class { public: double ComputeSumOfAllDataValues ( const IDataSource t * ) ; } ; The idea being that I can create an instance of a SumCalculator t, and call the 'Compute' method passing in a re...
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