microsoft.public.dotnet.languages.vc Archive - May 2002
Post a message to this list
Messages
Page: 12
Time Class in Managed C++? (2 replies)
microsoft.public.dotnet.languages.vc
Is there a "managed C " wrapper class for time variables? I am writing some managed wrapper classes for a series of exportable classes in a DLL written under VC 6. One of the methods of a class in the DLL returns a CTime object, and I would like the managed class to return the ..NET analogue. What is this? Thanks, Mark PS. So far I find "managed C " to be something of a misnomer managed it may be,...
creating indexed properties and using from CSharp (4 replies)
microsoft.public.dotnet.languages.vc
Hi, I have written the following managed class : public gc class WSSDataAccessClass { WSSDataAccessClass() { Console::WriteLine(S"This is a test"); } public: property String* get DummyIndexedProperty(String* s1) { String *arrS gc[] new String * gc[2]; arrS[0] S"Parameter "; arrS[1] s1; String *s; s String::Concat(arrS); return s; } }; and I've tried to use the DummyIndexedProperty from CSharp, lik...
returning char arrays from C++ to c# (2 replies)
microsoft.public.dotnet.languages.vc
Hi Does anyone have any idea how to return an array of chars from a function? I have tried using nogc[] with no effect, I just get the error that I am returning an array, yet the sample MS code I have doesn't return the same error. Thanks
converting from System::String to c++ char array (4 replies)
microsoft.public.dotnet.languages.vc
Does anyone know how to convert a System::String to a c char array? I thought the solution was Encoding::GetChars but it returns a System::Char array. Thank's, Iulia
Assembly DLL. (2 replies)
microsoft.public.dotnet.languages.vc
Hi everyone, I've been working on a testing application for my Managed c classes. Everything has worked out exceptional so far. I have one thing left on the list. Right now the application needs to be built with knowledge of the class it's loading. The interface to each class in each assembly is exactly the same so in reality the application only needs to know 2 things. The assembly to load and th...
How to retrieve global assembly attributes (2 replies)
microsoft.public.dotnet.languages.vc
Hi, Can anybody explain how to retrieve global assembly attributes such as AssemblyTitle or AssemblyCompany. These attributes are defined in the AssemblyInfo.cs file but I couldn't find a way to read them. The classes in System::Reflection seem to support only custom attributes. Thanks Kurt
Does no one program in VC? (12 replies)
microsoft.public.dotnet.languages.vc
I've posted a message in this forum, ATL as well as SqlXml hoping to hit the right spot on my question of translating VB to VC. The VC code needs to set a provider specific property as defined by SqlXml. So far, after three days I've not received a reply. Did everyone drop C ?
c project in vc7? (2 replies)
microsoft.public.dotnet.languages.vc
How do I make a plain c project in VC7? I know how to compile as C code, but it still saves it as a C .cpp source file. I would like it to be saved as a .c file. Thanks for any advice. RBS
How to read from managed Stream* to unmanaged LPBYTE? (2 replies)
microsoft.public.dotnet.languages.vc
I need to build a MC function that receives System::IO::Stream*, read all contents into buffer and call Win32API. Maybe I don't understand how to marshall between managed byte[] and LPBYTE...could someone pointed me to the right direction? The only way I can think of is: int cb (int)stm Length; LPBYTE rgb new BYTE[cb]; for (int i 0; i cb; i ) rgb[i] stm ReadByte(); But I'm guessing there's better ...
Passing byte array from C# to C++ COM interface (2 replies)
microsoft.public.dotnet.languages.vc
Hi, Have a little trouble passing a byte array in C# into a C implemented web service, the C# code is: FileStream fs new FileStream("c:\\work\\temp\\Waremouse.mp3", FileMode.Open); BinaryReader Reader new BinaryReader(fs); Reader.BaseStream.Seek(0, SeekOrigin.Begin); long lLength Reader.BaseStream.Length; Int32 nLength System.Convert.ToInt32(lLength); byte[] bData Reader.ReadBytes(nLength); fs.Clo...
LoadLibrary generates MessageBox when failing to loadlibrary in Managed C++ (8 replies)
microsoft.public.dotnet.languages.vc
I have a Managed C DLL that calls LoadLibrary on a VC6.0 DLL. The DLL exists and normally loads, but the DLL is statically linked to another DLL. Just as a test, I removed the statically linked DLL from the path so it wouldn't be able to load. I put error handling in the Managed C DLL to check the result of LoadLibrary. All the code works fine except that the call to LoadLibrary pops up a dialog s...
Managed C++ and pinning question.. (4 replies)
microsoft.public.dotnet.languages.vc
Hi folks, First off, sorry for the cross post but I am not sure where this question belongs... The project is an ASP.Net application that needs access to an object model written in C (no managed code at all). So I did the following: 1) Wrapped a couple of the C classes in MC and compile as managed DLL. 2) Added reference to ASP.Net/C# application. 3) Call into the code through the managed wrappers...
Creating a system tray icon? (3 replies)
microsoft.public.dotnet.languages.vc
Hi guys I'm new to the Microsoft blend of C and I'm looking for a tidy bit of VC7 code which will create a system tray icon and a popup menu. Couldn't see anything in the samples, so I'd appreciate it if you someone could help. Tia, Dave.
runtime check of overflows (5 replies)
microsoft.public.dotnet.languages.vc
Hello Is it possible in MC to check for overflows at runtime similar to the /checked option of the c# compiler? Thanks
Dispose method - buggy? (2 replies)
microsoft.public.dotnet.languages.vc
I have just started VC .NET so kinda using some basic stuff. Is there a known bug with Dispose? I have one base class and 2 derived classes. Base class inherits from IDispose interface and has Dispose method implemented. Similarly the derived classes have Dispose method. I set a bool member in the Dispose method to true and in every other method of the class I check its value. If its true, I throw...
How to manage array of __gc pointers (3 replies)
microsoft.public.dotnet.languages.vc
gc class Managed { }; gc Container { Managed* array[]; Container() { array new Managed* [100]; } ... }; Now, who is responsible for deleting array[]? Should I have e.g. ~Container() { delete[] array; } ...or is it completelly redundant, or even a bug? (The compiler does not complain about the 'delete[]' statement, which is kind of suspicious). Another question: is it possible to have gc array of e...
calling C# from C++ MFC app ? (2 replies)
microsoft.public.dotnet.languages.vc
Can I embed C# code in a C MFC app ? Got any URLs talking about this ? Thanks, Lynn McGuire
Initialize a System::Date with a time_t variable (2 replies)
microsoft.public.dotnet.languages.vc
Hi, Any tips on the above? Thank you.
ATL Web Server return values question? (3 replies)
microsoft.public.dotnet.languages.vc
Hi, I have written a ATL web server in VC 7.0 and this returns HRESULTS as expected, When an error occurs I return rich error information using ICreateErrorInfo & IErrorInfo interfaces.... This web service is consumed in a C# application, when an error occurs in the ATL web service the C# client recieves a SOAP fault which is translated into a System.Web.Services.Protocols.SoapException, the quest...
Can anyone explain what "unmanaged c++" really is (3 replies)
microsoft.public.dotnet.languages.vc
I have a managed c DLL with a class defined within it. This class does not have gc in front of it, so according to the documentation, by default the class is nogc. So apparantly this means that instances of the class wont be garbage collected. The questions are Does nogc mean that this class is also now "unmanged". Does an "unmanged" class mean that it is complied into CLR code but not garbage col...
System.Text.dll - help! (2 replies)
microsoft.public.dotnet.languages.vc
Hi, I have this line in my Managed C App #using System.Text.dll And it throws this error.... c:\Documents and Settings\Ark Master\My Documents\Visual Studio Projects\Busted View\Busted View.cpp(10): fatal error C1107: could not find assembly 'System.Text.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable This seems very odd to me.... it works in ...
Automating Builds in .NET (9 replies)
microsoft.public.dotnet.languages.vc
I currently have a program that creates a set of code files from a user defined data table. The files are created dynamically with no editing from the user, and these files are then built into a static library that gets linked to a separate application. This process works very well for what I need, but it's rather tedious, and I've been looking for a way to automate it. When a user adds new data t...
How to declare a MC++ function that returns a managed array? (3 replies)
microsoft.public.dotnet.languages.vc
I tried: public gc class A; property A*[] get Array(); property A[] get Array(); property (A*)[] get Array(); All without luck. Nor I can find in documentation. Search on Google also didn't help. Does anybody know how to do this?
InputBox? (4 replies)
microsoft.public.dotnet.languages.vc
Is there a .NET equivalent of the old VB Input (or the javascript window.prompt()) function? I just want a quick and dirty popup that let's the user input a string.
Serious performance problem in System.Neo.Sockets! (2 replies)
microsoft.public.dotnet.languages.vc
I'm building network application, that use standart System.NET.Sockets.TcpClient and TcpListener classes. To listen clients on the server I just make something like: TcpListener listener new TcpListener(8888); listener.Start(); while(true) { TcpClient client listener.AcceptTcpClient(); SheduleProcess(client); ... } And it's working right. But i have too slow performance with it. Server responsed w...
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