I tried creating a VC++/MFC dll with a function signature
short SendAT6400Block (short a, LPSTR command, short b);
and using the above pinvoke signature i was able to pass the string successfully to this DLL.
Also i tried these signatures in the VC++/MFC dll
short SendAT6400Block (short a, char* command, short b);
short SendAT6400Block (short a, char command[258], short b);
...
User Profile
Collapse
-
try this
[DllImport("C:\\ WINDOWS\\system 32\\nt6400.dll" , CharSet = CharSet.Ansi)]
public static extern short SendAT6400Block (short address, string cmd, short irqnum);Leave a comment:
-
How to call event or delegate asynchronously in C#
If we call Delegate.Invoke () then the handler will get called synchronously. Means till the handler function is completed the control will not return back.
In order to call it async, use BeginInvoke()....Code:delegate void Foo(); Foo evtFoo; evtFoo.Invoke(); //This will not return until the associated handler function is completed
Leave a comment:
-
How to create a vertical scroll bar in C#
Vertical progress bar
------------------------------------------------------------
Derive your class as shown below
...Code:class VertProgress : ProgressBar { override CreateParams CreateParams { get { CreateParams crParam = base.CreateParams; crParam.Style |= 0x04;Last edited by Frinavale; Oct 30 '09, 01:07 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.Leave a comment:
-
Thanks for the suggestion. Actually in production site, this environment variable will hold some important information (as per design) hence it should be visible to only this user account. Can't put it in HKEY_LOCAL_MACH INE\Environment .
Is there any way we can achieve this by code.Leave a comment:
-
How to set environment variable of another user in windows
I need to create an environment variable for another local user in windows. For example, say suppose there are 2 users in the system (User1 and User2). Currently User1 is logged in the system. Now Is there any way we can create user level environment variable for User2 using C# .Net 2.0.
If we use Environment.Set EnvironmentVari able(envName, envValue, EnvironmentVari ableTarget.User ) then it will create the environment variable for the...
No activity results to display
Show More
Leave a comment: