|
Hi
Try the following link on how to marshal c++ class
We have a similar concept that works at production environment
http://www.codeproject.com/csharp/marshalCPPclass.asp
|
|
|
|
|
I am not sure what to even call my question so I couldn't make a better subject. Sorry about that.
I have been making a custom web user control for sometime now and I am quite pleased with the results.
Only one more thing I want to get it to do. My control has a table in it with a method to add cells. I can add anything into the cells as I want as you would normally be able to with a table.
How can I get my control to allow this type of mark up as normal controls do?:
<table><asp:Button ID="btnTest" runat="server" /></table>
I want to be able to do this:
<custom:MyControl ID="myControl" runat="server"><asp:Button ID="btnTest" runat="server" /></custom:MyControl>
I want my control to add the button automatically by calling my code of choice. Any leads in the right direction greatly appriciated!
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
how to create partial class in c#.net ?
|
|
|
|
|
Do you even know what that means??
A partial class mearly exists acrossed two different source files, but you have to tell the compiler to expect the class to be define in multiple files using the partial modifier.
Read this[^] for everything you need to know about "partial classes".
|
|
|
|
|
Yes i know is different file! but my problem is how to insert a partial class in my project.? Thanks in advance.
|
|
|
|
|
Add a class. Add the partial keyword. Add another file, and edit it to be another partial file for the same class.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
You didn't bother the read the link I posted, did you?
|
|
|
|
|
R u a Student or Developer?
Partial Class is :
Using the partial keyword indicates that other parts of the class, struct, or interface can be defined within the namespace. All the parts must use the partial keyword. All of the parts must be available at compile time to form the final type. All the parts must have the same accessibility, such as public, private, and so on.
Regards,
Satips.
|
|
|
|
|
|
With a text editor.
|
|
|
|
|
|
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
ROTFL
Regards,
Satips.
|
|
|
|
|
Hi all,
whenever use this little section of code i get a permission error. I have admin rights to all the boxes i want to check but im not sure how to pass admin credentials to the machines to can get use the GetProcesses method
code follows:
foreach (System.Diagnostics.Process proc in System.Diagnostics.Process.GetProcesses(MachineName))
{
try { textBox3.AppendText("Proc Name: " + proc.ProcessName.ToString() + " @ " + proc.StartTime.ToString() + "\n"); }
catch { }
}
|
|
|
|
|
What Permission Error it says?
Regards,
Satips.
|
|
|
|
|
Couldn't connect to remote machine
|
|
|
|
|
Try with LOGON32_LOGON_NETWORK (value 3) as LogonType, the token returned by LogonUser is an "impersonation token", such a token CANNOT be used in WindowsIdentity.Impersonate() in order to access network resources.
Then go with the code.
Regards,
Satips.
|
|
|
|
|
i understand the idea kinda of but how would i put that into code ( i will be off googleing this but if you have an example handy i could use the help)
|
|
|
|
|
System.Diagnostics.Process[] ipByName = System.Diagnostics.Process.GetProcessesByName("notepad", "192.168.1.19");
Ive also tried something like this
|
|
|
|
|
Are all these machines in the same domain, or is this a Workgroup environment? If domain, then the code has to run under an admin account that the domain trusts. If workgroup, then the Admin account username AND password must match those on the machine that's running your code, exactly, meaning exact same username and exact same password.
This really isn't caused by a problem in your code. It's more of an understanding of how Windows networking works.
|
|
|
|
|
its a domain
i am an admin to my machine and my log on gives me admin rights to all the computers i need to access
also i know the cred's to THE admin account across all the computers
from my session on my laptop i can see and access all the computers (\\usat-whatever\c$\whatever)
|
|
|
|
|
Well, you need an account that gives you admin rights to all the machines. Your code is saying that the account it's running under doesn't have it.
Just having access to the hidden shares on the machines isn't enough.
|
|
|
|
|
well i do know the "administrator" and its password account for each box i need
how would i pass that to the machine
-- modified at 9:19 Monday 18th June, 2007
for example lets say i usually log in as
User:administrator
Pass:crash893
to the local machine
how would i pass that too the get proccess method so that the computer on the other end would know its me?
|
|
|
|
|
Well, it might be you can do something like:
System.Threading.Thread.CurrentThread.CurrentPrinciple = New System.Net.NetworkCredential("user","pw")
or something along those lines. I HAVE NO IDEA IF THIS WILL WORK!! I HAVE NOT TESTED IT AND DON'T HAVE AN ENVIRONMENT TO TRY IT IN!!
|
|
|
|
|
that looks very promising
i will try it at work tommrow
would i run that at form load? or in the event?
edit
did you mean
CurrentCulture i dont see anything else close?
|
|
|
|