|
I actually have 2 and 3 combined... both managed and unmanaged c++ in the same dll.
I added another managed class to the dll, which just returns the sum of two numbers and does not access any managed code, but I get the same error.
Thanks,
-----------------
Genaro
|
|
|
|
|
Gee, I was not even aware you could do that... But then, I dont use C++, I use
either C#, or C# + unmanaged C with PInvoke.
Maybe the presence of unmanaged code prevents you from calling the managed half of
that mixed dll ??
Luc Pattyn
|
|
|
|
|
Hi Picazo,
Actually, come to think of it; I can not believe you can do that at all.
Please feel free to e-mail me a zip with your solution and stuff, or at least
such combined dll. I would like to look inside it !
Regards
Luc Pattyn
|
|
|
|
|
Hey Luc,
http://sqlite.phxsoftware.com/[^]
These guys to the same, they have combined the original Sqlite3.dll (c only) with a managed C# wrapper.
Supports the Full and Compact .NET Framework as well as native C/C++
The library is 100% binary compatible with the original sqlite3.dll and has no linker dependencies on the .NET runtime for full unmanaged C/C++ development.
And you can get the source
|
|
|
|
|
Thanks a lot, Steve. I will look into that some day.
Seems like picazo should have a look too into that source code...
Luc Pattyn
|
|
|
|
|
Best guess - you have a problem loading the library, because of WinSxS issues. Do you have more than one PC ? My notebook died recently, to the point that a vanilla dll and vanilla C# app would blow up in this circumstance. My own code runs fine on my desktop still.
At the same time, are you sure that all the dlls your code relies on are in the directory of the exe ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi All
the problem is this that i m filling the treeview from the XML File when the form load event occurs the treeview starts making its nodes and child nodes . when I add a node to the XML file it is added but the tree doesnt show it again restarting the application displays the node newly added. I tried the refresh method but I think the problem is this that xmltextreader is forward reader of xml file when the new node is added the cursor is not there which avoids the treenode to make itself updated how to get rid of this problem
SAS
|
|
|
|
|
You have to refresh you TreeView manually by reloading the Xml file. One way to check if the Xml file has been modified is to get the hash code of file, last modified attribute, or store the size in bytes in a long. Then make a timer to check if the values has changed let's say every minute. If there are changes clear all the nodes and reload them again like you did in the load event.
Regards
|
|
|
|
|
Nader Elshehabi wrote: One way to check if the Xml file has been modified is to get the hash code of file, last modified attribute, or store the size in bytes in a long. Then make a timer to check if the values has changed let's say every minute.
Or simply use a FileSystemWatcher component and handle the Changed event
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I don't know why I go the hard way.
Thanks Stefan. Nice catch.
Regards
|
|
|
|
|
Don't think doubleposting will solve your problems.
Best regards!
-Larantz-
|
|
|
|
|
A small addition to the things Nader told you: A simple way to be notified of changes on your XML file is to use a FileSystemWatcher component and handle the Changed event.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi, I Would like to know how do i read an Excel Document from C#
La Light
|
|
|
|
|
Depending on the version of Excel, you can control Excel via COM, or via .NET. But, you can't read it, on a machine that doesn't have Excel installed, unless it's Office 2007, using the new file format, in which case, the document is a zip that contains XML.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well, this will only work if your Excel file simply contains Data, no Macros.
Instead of saving as an Excel (*.xls) file, save it as a Tab-Delimited Text File (*.txt)
Then just use a StreamReader to read it as plain text.
|
|
|
|
|
Hi All
My application (C#, Framework 1.1) running in the background. I am displaying a form in every five minutes. This form has only a hyperlink control. To show myForm I am using
myForm.ShowDialog();
When this form is displayed, it grabs the focus, and I loose the focus if I am working in another application, say, MS-Word. My form has the following properties set.
myForm.TopMost = false;
myForm.FormBorderStyle = FormBorderStyle.None;
How can prevent this from happening?
Can anybody help me on this?
Thanks
Muthu.
|
|
|
|
|
|
Hi,
My issue is I want to show the form..I don't want to hide it. When I am showing that form..it should not get any focus. The work being done in other applications should not be interrupted.
Thanks
Muthu.
|
|
|
|
|
Why are you using ShowDialog() instead of Show() ?
ShowDialog() makes the form the top window for that application (as with modal
dialogs, the onces you can not ignore inside an application),
whereas Show() is used normally for forms and for modeless dialogs (the ones you
can leave open but still allow you to operate other windows).
Luc Pattyn
|
|
|
|
|
Because I am calling ShowDialog() in a Thread. If I use Show(), it gives a weird look, and controls in the second form not diplayed and grayed.
Thanks
Muthu.
|
|
|
|
|
When I insert a char in textBox, the program will fall because that variable inserted in the textBox must to be integer.
How to fix this.
Vasildb
|
|
|
|
|
Vasildb wrote: the program will fall because that variable inserted in the textBox must to be integer.
I don't understand what you mean by that. You can use the TextBox.Text property to set its text to a string .
/ravi
|
|
|
|
|
The text inserted in the textBox must be integer. But if I enter something else............. Problem.
Vasildb
|
|
|
|
|
So do you mean you want to prevent the user from entering anything but integers into the TextBox ? If so, you may want to use a MaskedTextBox [^].
/ravi
|
|
|
|
|
Yes. But how to do that, because I have Visual Studio 2003.
Help.
Vasildb
|
|
|
|