|
First, you may want to have a look at the MATLAB Builder for .NET[^]
Second, it would have been helpful to have posted the original C calling syntax for the mexFunction , which is
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]); There is an example here Integrating MATLAB with C#[^] that might help you as well, but you probably want the mxArray parameters to be declared as ref IntPtr or possibly out IntPtr[] parameters.
|
|
|
|
|
Hello,
VS 2005 & IIS 5.1
I am using an updater block, just so you know what I am talking about you can get it from this link:
http://www.microsoft.com/downloads/details.aspx?familyid=C6C09314-E222-4AF2-9395-1E0BD7060786&displaylang=en
I have a server which i have my updates and the manifest.
However, the client will download the manifest and in the updaterLog it will say manifest downloaded ok, but validation failed. See full error msg below.
However, If i create a virtual directory on the same computer as the client is running on, and have the updates in there. Then everything works fine. So all my code is working ok.
However, its when the updates are on the server which is on a network. That it does not work. It make me believe there is a difference in what I have to do to get this to work on the network.
I have tried 2 different computers running the client and having the updates located on each one. Both work well when the updates are on each of the local computers. But when I try and get the updates to work when they are on the server it fails.
Also, i have double checked the private and public keys. They are all in order.
Is there something I need to do on the network to get this to work? Maybe set some permission? Why does the manifest become invalid when it is download from the server on the network?
Your help with any suggestion would be most grateful,
Thanks,
Error from log file
<CODE>[DownloaderManager.ValidateManifestFile] :
MANIFEST VALIDATION FAILED:
The server Manifest located at
'C:\Program Files\CodeRed\Updates\Manifest.xml' failed validation.
It is being deleted; its signature did not match the signature of the file that was downloaded.</CODE>
|
|
|
|
|
Hi.
For my application, I need a text control that help to enter an IP address, like the one available in Visual C++. But I can't find that IP control, there's no NET control like this one and also I can't find it as COM control. In MSN we can find that IP control is in comctl32.ocx but, browsing for this library in Visual Studio, and trying to add it as component, it auto checks a few objects like listiew, treeview, etc, but nothing about IP conrol.
So, where is the fuc*** IP control?. (sorry)
I know, I'm sure that there's a NET control, there in the toolbar, but I can't figure out where. Instead, I'm using a MaskedTextBox, but it would be more easy with the IP Control.
Thank you.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Forget it!.
I found the answer at: http://www.codeproject.com/cs/miscctrl/IpAddrCtrlLib.asp[^]
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
I have been tasked with creating a windows form that will be like a paint program. The user should be able to drag units from a toolbox and drop them on the map. Then be able to resize them and move them around on the map. This way they create a map over their facility with storage units.
I have never developed much GDI+ related stuff and i have no clue how to do this. Can someone please hint me where i can find some good articles on how to place items like this on a surface and then move them around.
Thanks for any help.
-- modified at 14:07 Monday 20th August, 2007
|
|
|
|
|
This is not a paint program, it's a drawing program. The difference is that when you paint, you leave behind pixels, when you draw, you leave shapes that you can then interact with. Basically, what you want to do is store a collection of a base shape class, and create derived classes for the shapes you draw. Then when you move the mouse, you need to iterate over those shapes to work out if the mouse is over one. If it is, you start using mouse actions to interact with the shape in question. Changing that instance of a shape class, obviously then changes how it is drawn on screen.
GDI+ actually does very little here, each shape knows how to draw itself, and presumably the drawings are not that complex. The real work is in working out what shape the mouse is over, and manipulating it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I hate to think how many times this question has been asked, but here goes--
I have a "Back" button where "CausesValidation" is false. It closes the current dialog. The stupid thing is, the close dialog fires the validation routine!!! WTF? That's why I don't want validation. And I checked which control has focus when close fires, and it's the Back button.
So, what's the correct way of closing (as in, canceling) a dialog that has some controls that do validation, but the user's clicked on a back or cancel button (with CausesValidation set to false) so we obviously don't want to do validation?
Because, the stupid thing is, it's focused on a control that doesn't cause validation yet it's trying to validate a control!
Automatic validation, BTW, is one of the lamest, most poorly implemented features of .NET. I'm not even sure why I'm using it! It must have been by written by some highschool dropout on a bender.
Marc
|
|
|
|
|
Marc Clifton wrote:
Automatic validation, BTW, is one of the lamest, most poorly implemented features of .NET. I'm not even sure why I'm using it! It must have been by written by some highschool dropout on a bender.
Hahaha, that must be quite some guy??
Doesn't the this.DialogResult = DialogResult.Cancel work?
|
|
|
|
|
Eduard Keilholz wrote: Doesn't the this.DialogResult = DialogResult.Cancel work?
I'll have to try that, even though these are modeless forms (not displayed with ShowDialog). Which I guess is why I didn't even think of trying that.
Marc
|
|
|
|
|
Eduard Keilholz wrote: Doesn't the this.DialogResult = DialogResult.Cancel work?
Just got around to trying it. Nope, doesn't work. I'm having the validator find the control that has focus and checking the CausesValidation button. Fortunately, all my validators go through one validation event.
Marc
|
|
|
|
|
Hey, i have a question...
I'm writing a program, it goes like the following:
it reads every line in the txt file as one option, and you can select those options, let's say the resolution of, and after that it writes the value to another file (a settings.ini for example), then boots the specified program with that changed value.
it's like:
Settings.txt:
<br />
640x320<br />
800x600<br />
1024x768<br />
1200x1024<br />
1600x1200<br />
and so on.
now how can i make the .txt file be shown in the listview, and how can i define every line as 1 option?
|
|
|
|
|
This should come close....
<br />
StreamReader sr = new StreamReader("path\to\file", FileMode.Open);<br />
<br />
string sLine = sr.ReadLine();<br />
<br />
bool Loop = (sLine.Length > 0);<br />
while (Loop)<br />
{<br />
ListItem li = new ListItem(sLine);<br />
listName.Items.Add(li);<br />
sLine = sr.ReadLine();<br />
Loop = (sLine.Length > 0);<br />
}<br />
sr.Close();<br />
|
|
|
|
|
FileMode.Open is an inacceptable overload =x
|
|
|
|
|
Hi,
this will get you started:
string[] stringArray=File.ReadAllLines(@"path\to\file");
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Does anyone know any API to install fonts to windows folder?
On XP I used to just copy those to windows/fonts folder, but it does not work on vista.
There is windows API AddFontResource, but it only installs font until user reboots computer.
Thanks.
|
|
|
|
|
You can add fonts to your setup & deployment project and then register it as font..
|
|
|
|
|
I need to do it programmatically.
|
|
|
|
|
I did not need to register the new font. I copied the new font file into the directory during the install. XP and Vista found it and listed it in the font selection dialog with no problems.
did not know that i had to register the font in anyway
|
|
|
|
|
I think i have the same problem. I want to copy the a font file by using my program, but the only thing i managed until now is to register the font file vie AddFontResoucre so openoffice can use it until my pc reboots. I tried to get write permissions by using FileIoPermission for the font-Directory but when my program actually copies the file to the directory it says i dont have the permission to do so.
My code looks like this:
FileIOPermission f2 = new FileIOPermission(FileIOPermissionAccess.Write, "C:\\Windows\\Fonts\\");
f2.AddPathList(FileIOPermissionAccess.Read, fontPath);
try
{
f2.Demand();
System.IO.File.Copy(fontPath, destination);
}
catch (SecurityException se)
{
MessageBox.Show(se.ToString());
}
catch (UnauthorizedAccessException ex)
{
MessageBox.Show(ex.ToString());
}
<pre>
|
|
|
|
|
hi Frnds
I want to call the .dll file created by c#.net. in one of my vb application
after creating the dll ,i am giving the reference of this Dll in my vb application ,but i am not able call the methods of this dll.
Please help me , or give me some good tutorial Link
Thanks in advance
«·´`·.(*·.¸(`·.* *.·´)¸.·*).·´`·» ©
*.¸¸.·´¨` »*Vicky*«´¨`·.¸¸ .*
«·´`·.(*.·´(¸.·* *·.¸)`·.*).·´`·»
|
|
|
|
|
What errors are being returned? Also, why don't you use VB.NET?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
i am not getting any error.
i am not able to call the functions of that Dll
«·´`·.(*·.¸(`·.* *.·´)¸.·*).·´`·» ©
*.¸¸.·´¨` »*Vicky*«´¨`·.¸¸ .*
«·´`·.(*.·´(¸.·* *·.¸)`·.*).·´`·»
|
|
|
|
|
Did you add a reference to the dll?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
The only way you can use newer technology like C# via obsolete technology like VB6, is to use something that VB6 knows about. In this case, this means you need to create a COM DLL in C#, and then VB6 can call it via COM.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i am able to take the reference of that dll.
i am not able to rectify either the problem with the dll creation or taking ref.
i have a c#.net project .i am creaing the dll using this.
the procss i am following:
1)tlbexp (to create typelib)
tlbexp ComInteropExample.DLL /out:ComInteropExample.tlb
2)regasm
regasm ComInteropExample.DLL /tlb: ComInteropExample.tlb
after this i m taking the ref of the .tlb file in my vb project.
i am not able to call the function inside.
Plz help
«·´`·.(*·.¸(`·.* *.·´)¸.·*).·´`·» ©
*.¸¸.·´¨` »*Vicky*«´¨`·.¸¸ .*
«·´`·.(*.·´(¸.·* *·.¸)`·.*).·´`·»
|
|
|
|