User Profile

Collapse

Profile Sidebar

Collapse
vkbishnoi
vkbishnoi
Last Activity: Nov 12 '09, 07:27 AM
Joined: Oct 30 '09
Location: Pune, India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • vkbishnoi
    replied to Char Pointer from C++ DLL
    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);
    ...
    See more | Go to post

    Leave a comment:


  • vkbishnoi
    replied to Char Pointer from C++ DLL
    try this

    [DllImport("C:\\ WINDOWS\\system 32\\nt6400.dll" , CharSet = CharSet.Ansi)]
    public static extern short SendAT6400Block (short address, string cmd, short irqnum);
    See more | Go to post

    Leave a comment:


  • vkbishnoi
    replied to How To: Use Events In .NET
    in .NET
    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.

    Code:
    delegate void Foo();
    
    Foo evtFoo;
    
    evtFoo.Invoke(); //This will not return until the associated handler function is completed
    In order to call it async, use BeginInvoke()....
    See more | Go to post

    Leave a comment:


  • vkbishnoi
    replied to .NET Tips and Tricks
    in .NET
    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;
    ...
    See more | Go to post
    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.
    See more | Go to post

    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...
    See more | Go to post
No activity results to display
Show More
Working...