|
Firoz --
I've been meaning to upload an article on this...
__typeof() doesn't work on types that haven't been fully parsed by the compiler; this will be fixed in a future release. As a workaround, place a dummy class ahead of your MyControl class and specify it instead:
namespace NickHod
{
namespace Multimedia
{
private __gc class ThisAssembly
{
};
[ToolboxBitmapAttribute(__typeof(ThisAssembly), S"CdDrive.bmp") ]
public __gc class CdDrive :
public System::ComponentModel::Component
{
The next trick is to name your bitmap using the fully qualifed namespace where the dummy-class lives. In my example above, the bitmap filename is "NickHod.Multimedia.CdDrive.bmp"
In the Linker/Input settings for your project, specify this bitmap under "Embed Managed Resource File" (the linker switch is /ASSEMBLYRESOURCE).
The other thing you'll need to do is use sn.exe to genereate a strong-name for your assembly (specified in AssemblyKeyFileAttribute() in AssemblyInfo.cpp), then register it in the GAC with gacutil.exe.
Good luck!
-Nick
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Hi,
I am looking for a way to convert a double to the char representation, ie. put double, which is eight bytes, to char[8];
Example:
double nDb = 12.34;
char szDb[8];
szdB would hold the character representation of nDb which might look something like:
[0] 0''
[1] 0''
[2] 0''
[3] 0''
[4] 0''
[5] 0''
[6] 51'3'
[7] 64'@'
Thank you.
|
|
|
|
|
For native or managed code?
Something like the following would do the trick:
(in native code)
memcpy(szDb, &nDb, 8);
(with a managed array)
char __pin* temp = &szDb[0];
memcpy(temp, &nDb, 8);
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
|
|
|
|
|
I have a general question. I am using fread(...) fn in my program. I created a FILE *inFile to point to the file that i opened for read. (ie. inFile = fopen("c:\\document.bnm","r"))
I am reading 20 ascii characters at a time from the file and then send them out thru the serial port ,....i keep doing this until the end of file is reached. My file opening and reading is defined in one class called COpen and my serial communication routines are defines in a class called Tserial_event.
Once I call the function from COpen to send data thru the serial port (
com->sendData(), where com is an object of class tserial_event) and the program jumps to where the sendData fn is defined the value of inFile is lost!!!!!!!!! Originally it points to location 0x1027a898, when it jumps to sendData() it becomes 0x0000000??? and then when it returs to the fread statement to raed the next 20 characetrs it crashes, saying that I am raeding at an invalid location obviously because my pointer was lost.
My question is how should I define inFile so that it wouldn't change value when I uump to another class.
I NEED HELP ASAP IF SOMEONE CAN HELP ME
|
|
|
|
|
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
whenever i use this in managed c++ i get a compile error of
calling convention redefinition from __clrcall to __Stdcall ignored.
is there another way of doing this in managed c++
|
|
|
|
|
|
whats IJW who to use it if i want driectly csocket class in mine managed code?
nish plz reply again
r00d0034@yahoo.com
|
|
|
|
|
These are some articles on IJW. The first one is an intro tutorial :-
http://www.codeproject.com/managedcpp/nishijw01.asp
http://www.codeproject.com/managedcpp/ijwscrcap.asp
http://www.codeproject.com/managedcpp/cbwijw.asp
http://www.codeproject.com/managedcpp/mcppshortcuts.asp
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
|
Hi All,
I have some old Visual C++ code that I think would
work well as a "web service".
Is it difficult to convert my existing VC++ code
to .NET code?
Does that even make sense? Please help!
|
|
|
|
|
I guess there is no definite answer. I am assuming you would write the web service in Managed C++, so at least some of the code could port over with ease. You would basically just want to rewrite the application from scratch, referencing your existing app. for logical aspects. If your existing code is complex and convoluted then your web service very well could be too. Using Visual Studio.NET will definitely help you in the web service arena.
Soliant | email
"the result is that VC7 is the only compiler to generate optimized MSIL" - Stanley Lippman
|
|
|
|
|
if i got the hwnd of any process through process class
how will i convert it into HWND type?
r00d0034@yahoo.com
|
|
|
|
|
|
can any body tell if i want to inherite a managed class from csocket class how will i do it plz writ exact code i will be very thank full to u ?
and if i write a wraper class of csocket who will i over ride OnAccept and OnRecive method?
r00d0034@yahoo.com
|
|
|
|
|
|
First off I'm absolutely new to the .NET environment all together.
I recently bought Visual Studio .NET academic. I wrote a small web service in managed C++ but it keeps telling me that I must have IIS installed to run the service. Is there any other way to test this without running IIS? It's not that big a deal I'm just playing around with .NET at home. Just curious.
nay
|
|
|
|
|
You can definitely consume a web service without IIS, as to providing a web service I beleive they provide xml/soap messages via http, that is why they are so popular, distributed over a common protocol like http. So you are probably going to need a http server, it doesn't necessarily have to be IIS, I don't think.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Can you use MC++ as your code-behind for ASP.NET page ?
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Not yet
cheers,
Chris Maunder
|
|
|
|
|
Microsoft wrote:
ASP.NET pages and ASP.NET XML Web Services files contain server-side logic (as opposed to client side logic) written in Visual Basic .NET, C# .NET, or any .NET compatible language. Source [http://msdn.microsoft.com/net/aspnet]
The above would make one beleive MC++ could be used for ASP.NET, the statement may be true, but I guess MS is assuming you will write the plumbing coding for the ASP_RUNTIME to recognize and compile MC++, not sure why they make this statement
Thanks.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Web services can definitely be written using MC++, but MC++ does is not supported by ASP.NET.
cheers,
Chris Maunder
|
|
|
|
|
Chris Maunder wrote:
but MC++ does is not supported by ASP.NET.
Chris,
I agree with this statement, ASP.NET does not support a Managed C++ parser, but you can program ASP.NET pages with Managed C++, please see my article
http://www.codeproject.com/useritems/HelloWorldMC.asp[^]
Thanks for your comments.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
I've asked Nick Hodapp, Microsoft's C++ Product Manager to write a note regarding issues involved with using Managed C++ in ASP.NET. It *seems* like it works but there are some "gotcha's" that mean it's not advisable.
cheers,
Chris Maunder
|
|
|
|
|
Hi I tried this,
am getting an error during compling it. I get the standard "not recognised command" error. Any ideas why?
Regards,
Vinayak
|
|
|
|
|
is there an easy way to add mp3 playback, like a looping mp3 that plays throughout the life of the application
|
|
|
|