|
Hello Everyone:
I have posted the same question in managed C++ board.
This is my problem:
I have C# project compiled as a DLL. The C# class is defined as:
public Cs_Class
{
String name;
public Cs_Class(String n)
{ name = n; }
....
}
I have another MC++ project that uses the DLL. The MC++ class is defined as:
public Cpp_Class
{
....
void Test(String* testStr)
{
//Create the c# class
//
Cs_Class* c = new Cs_Class(testStr);
}
}
The compilation/linking was fine. I then encountered a run-time exception:
System.MissingMethodException: Method not found: Cs_Class..ctor(System.String)...
Strangly enough, if I took out the String parameter in Cs_Class constructor and not pass in String* in MC++ class when constructing the Cs_Class object, then everything was fine.
Why??
Thanks in advance.
David
|
|
|
|
|
To hence forth the problem is to dematerialize the occasion of being interpeticular of yomessing
|
|
|
|
|
I'm not a native english speaker either, but this seems to come from a translation program and has completely lost its meaning in the process of translation.
Am I correct? And if I am, which translation service was used and what was the original phrase?
:->
mav
|
|
|
|
|
Hello,
I am not sure I understand what you meant here. Can you explain your point in plain English? Thanks
|
|
|
|
|
I want to compile a existing c# class file, inside another program. I used the Following code. But it does not give any outputs. can you tell me a correct way to do this. thanks.
Process pr = new Process();
pr.StartInfo.FileName = "csc.exe";
string filePath = "D:\\Dilan Projects\\Application3\\LabelWriter.cs";
pr.StartInfo.Arguments ="/out:cl_labelservice.dll /t:library " + filePath;
pr.Start();
this code not working.
|
|
|
|
|
'not working' is kind of enigmatic. What's going wrong ? Best guess - you need to specify a path to csc.exe
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Do you see a console window opening up? Did you try redirecting standard output and error to see what's actually going on?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Have you taken a look at the ICodeCompiler interface or the CSharpCodeProvider class?
They offer services to compile code on the fly without having to find out where the compiler actually lives.
Regards,
mav
|
|
|
|
|
Hi,
Anybody here using vs 2005 beta 2 yet? What do you like about it over vs 2003? I hear the integration with the new sql server 2005 is alot better. Is anyone here using Reporting Services 2005 as well. If so what do you think about it?
Thanks,
JJ
|
|
|
|
|
It's awesome. I've been using it for a while, and the new language features rock, and some of the new IDE features are amazing as well.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Totally agree with what you said.
What ever people say about Microsoft, but .Net 2.0 ROCKS!!!
Regards,
Sidhu
IF YOU DON'T HAVE ANYTHING TO SAY, WELCOME TO THE CLUB
Dotnet @ Work Where Dotnet works...
My Blog
|
|
|
|
|
Hi all.
Certainly almost of you know how to pass custom data to the application during installation ok
this happened by adding custom dialog with text boxes to hold these variables and change them .
Ok i don't need to know how to pass custom data cause i know it already .
But each time you double click the installer.exe file that had been created it gives you the custom dialog that you added to enter new information and each time you begin installation again it will demand from you new information ok.
But i don't want that, i need to make an executable file that you can open it and then enter these values in text boxes and press a button which creates these values in the installer.exe and then you can double click the installer.exe which is already created and install it without requesting these values again .
Miss With The Best And Die Like The Rest
|
|
|
|
|
Why don't you write the values into an XML file?
The installer could check, if the file is there, and then read the values or show the dialog.
_________________________________
Please inform me about my English mistakes, I still try to learn your language!
|
|
|
|
|
i've to load a png file and set it in my picturebox.
Before to set, i want to anderstand if it is a correct png file.
How cna i do?
|
|
|
|
|
Check if the value you've loaded is null. If it's not, then it loaded OK. This is assuming that GDI+ does not throw an exception for invalid files, which it could well do.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
so i don't get error messages if i try to put the PNG wrong in the picturebox?
|
|
|
|
|
If it's null, you probably just don't get a picture. If it's not null, it must be an image.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to check the version of Dot Net Framework installed on that computer... How should I check it dynamically...
|
|
|
|
|
For those of us interested in writing Internet Explorer plug-ins that can manipulate the surface of a user-selected web page, can anyone suggest resources with informatin on how to do this in C#?
I am trying to write an IE plug-in that overlays user-defined shapes on top of a web page, and am new to C# and COM. Any help would be greatly appreciated!
Thanks!
|
|
|
|
|
Thanks all
Certainly you know passing custom data during installation by overriding the install class to pass these data to the destination boxes or labels or anything in your application .
ok i need to make an executable file to let my user to put these values one time only one time and then It creates the installer.exe file with the new values . When you press installer.exe file that had been created already it install your application without the need to put these values again and even without the dialog boxes for entering it again did you imagine that ?
How can i make that please any help ?
Miss With The Best And Die Like The Rest
|
|
|
|
|
What are you talking about ? Creating an installer ? Why would the user want to install more than once ? If you mean to create default values that cannot be edited per install, why have them in a dialog box at all ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can run your installation with /q as parameter to let windows installer work without showing dialogs. If you need the values of some variables in your installation, these can be added as arguments to your call to msiexec like this:
msiexec /i mypackage.msi /q VALUE1=ABC VALUE2=123
You can put this call into an executable as well (for example, using Process.Start to run windows installer).
Perhaps the Windows Installer command line options[^] will help as well.
Regards,
mav
|
|
|
|
|
Good Day,
I am printing a form to a printer, but when I type in text, to my Rich Text Box, I noticed that the printer prints the size of the box (616,64), but if there is any text that you need to scroll to see, it prints it below the box! It's really kind of funny....
How can I change my code (below) so that it prints all the text in the box, without going outside the box, I guess it needs to dynamically change the size of the Rich Text Box being sent to the image....
Any help would be great!
case "RichTextBox":
RichTextBox rtb = (RichTextBox)c;
g.FillRectangle(new SolidBrush(rtb.BackColor), rtb.Left+1, rtb.Top + 1, rtb.Width+2, rtb.Height -2);
g.DrawString(rtb.Text, rtb.Font, new SolidBrush(rtb.ForeColor), rtb.Left + 2, rtb.Top + rtb.Height/2 - g.MeasureString("a", rtb.Font).Height/2, new StringFormat());
break;
I am assuming I need to change the g.DrawString, but not sure to what.
Thanks,
G
|
|
|
|
|
That way you'll never get an accurate picture of your RichTextBox.
You're printing a string with a constant font, although the RichTextBox can contain many different fonts and the text inside the RTB (or a TextBox) can be a lot longer than what is visible in the control.
I'd suggest you search CP for "hardcopy" (there are some articles on the topic) and then use the actual image you grab for printing.
Regards,
mav
|
|
|
|
|
Thanks for the reply Mav, upon searching the site for 'hardcopy', all I found was one project that was similar, but it was mostly in French. I'll keep looking...
Thanks,
G
|
|
|
|