User Profile

Collapse

Profile Sidebar

Collapse
alag20
alag20
Last Activity: Mar 16 '11, 10:10 AM
Joined: Apr 3 '07
Location: UK
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • trouble using unmanaged c++ from c# using dllimport

    Hi guys,
    i am having trouble importing c++ unmanaged dll into C# [winform]. Can someone help?
    Basically i am just trying to create a safearray of strings in c++ and trying to send it to C#.

    Here is my c++ code.
    Code:
    extern "C" __declspec(dllexport) BOOL GetStringArr(SAFEARRAY* arr)
    {
    SAFEARRAY*    myArray;
      SAFEARRAYBOUND  rgsabound[1];
    
      rgsabound[0].lLbound =
    ...
    See more | Go to post
    Last edited by Plater; Sep 9 '10, 02:04 PM.

  • Please help!!!! Any idea??
    See more | Go to post

    Leave a comment:


  • How about if i simplify it to say that the webpage will trigger each task. Next task can only be triggered once the previous task is completed. So keeping this in mind, what would be the best way to communicate between the webpage and the exe?

    Can you possibly give some sample code?

    Thanks in advance.
    See more | Go to post

    Leave a comment:


  • Thanks for your quick reply. All the tasks are mutually exclusive so it doesnt make a difference. The basic thing I would like to know to start with is if I have an exe and ASP.Net page, how can i communicate from ASP.NET to exe and get status?
    See more | Go to post

    Leave a comment:


  • C# executable with ASP.NET webpage to monitor status

    Hi Guys,
    I am working on a new project to provide some kind of monitor on a webpage. Basically i have a c# application which does task A, B....X, Y, Z.

    Now we would like to view what task it is doing / state in a web page and maybe trigger something in the application to stop all it is doing and do task T and then continue etc. Can someone guide me in the right direction?

    Thanks in advance.
    See more | Go to post

  • I agree with tlhintoq, that googling will give you lots of tutorials to explain in detail, but just as a reference for future, incase people come to this page via google, you can accomplish it in the way below.

    Code:
    [DllImport("user32.dll", SetLastError = true)]
            [return: MarshalAs(UnmanagedType.Bool)]
            static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
    ...
    See more | Go to post

    Leave a comment:


  • alag20
    replied to C# .Net 2.0 Automatic Configuration of proxy?
    in .NET
    Hi Sashi,
    Thanks for your kind help below. I fixed this in a slightly different way as below for anyone who may need it in future.


    Code:
    webRequest.Credentials = CredentialCache.DefaultCredentials;
                        if (WebRequest.DefaultWebProxy != null)
                        {
                            webRequest.Proxy = WebRequest.DefaultWebProxy;
                            webRequest.Credentials
    ...
    See more | Go to post

    Leave a comment:


  • alag20
    replied to C# .Net 2.0 Automatic Configuration of proxy?
    in .NET
    Any idea guys? i am still struggling with this.
    See more | Go to post

    Leave a comment:


  • alag20
    started a topic C# .Net 2.0 Automatic Configuration of proxy?
    in .NET

    C# .Net 2.0 Automatic Configuration of proxy?

    Hi Guys, I am working on a project to download files using .Net c# 2.0 SP1. One of the requirements of the project is to not seek any proxy details and automatically detect this from IE etc.

    Now i haven't worked with proxy before and hence i am a bit baffled. After hours of searching google, msdn etc, i have come across the following article http://msdn.microsoft. com/en-gb/magazine/cc300743.aspx#S 3

    Now i am totally confused...
    See more | Go to post

  • alag20
    started a topic Calling C# Callbacks from C++ dll?

    Calling C# Callbacks from C++ dll?

    Hi Guys,
    I have a C++ third party dll which does some algorithms for us and seldomly passes data back. Now we were wanting to use DLLIMPORT from c# to utilize these functions from C++ but are having some issues.

    Here are the function declaration in C++.

    Code:
    int DoWSUpdate(LPSTR lpName,LPSTR lpPath,LPSTR lpBinPath,MyCallBack pMyCallBack) 
    
    void (CALLBACK *MyCallBack)(DWORD dStatus,LPSTR
    ...
    See more | Go to post

  • Okay guys!
    After another day of messing around, i finally found the solution.

    I am posting it here in case anyone else might need it as well.

    You basically need to use ReplyMessage in Win32.dll in WndProc as shown below.

    Code:
     protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
                {
                    case (int)Msg.WM_USER:
    ...
    See more | Go to post

    Leave a comment:


  • SendMessage without waiting or PostMessage with Data

    Hi Guys,
    I need to send a string from c# application to another c# Application.

    On receiving application side the code i have is below.

    Code:
     protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
                {
                    case (int)Msg.WM_USER:
                        break;
                    case (int)Msg.WM_COPYDATA:
    ...
    See more | Go to post

  • alag20
    replied to Internet logging using c# & perl cgi script
    in Perl
    Any help to clean and make it better would be highly appreciated. Also can we return some text to the browser so that it shows some status from the script?

    Sorry i am very new at perl. i am more experienced with .Net but the server doesnt support it:(
    See more | Go to post

    Leave a comment:


  • alag20
    started a topic Internet logging using c# & perl cgi script
    in Perl

    Internet logging using c# & perl cgi script

    Hi Guys,
    Sorry for duplicate posting as this Question refers to both c# and perl cgi script on the net, so please help.

    Here is the original post
    http://bytes.com/topic/c-sharp/answe...pt#post3493381

    which contains the perl cgi script and c# code i am using.


    Please help - any help will be highly appreciated....
    See more | Go to post

  • alag20
    started a topic Internet logging using c# & perl cgi script

    Internet logging using c# & perl cgi script

    Hi Guys,
    Can someone please help me with this wierd issue?

    I have a c# code below
    Code:
    string lcUrl = "myscript.cgi";
    
    
    
                // *** Establish the request
    
                HttpWebRequest loHttp =
                     (HttpWebRequest)WebRequest.Create(lcUrl);
    
    
    
                // *** Set properties
    
                loHttp.Timeout
    ...
    See more | Go to post

  • alag20
    started a topic Customize FolderBrowseDialog .Net c#

    Customize FolderBrowseDialog .Net c#

    Hi Guys,
    I am looking to add a few radio button at the bottom of FolderBrowseDia log in .Net. As it is a part of CommonDialog, then it should be easy to customize however I have never done this and having lots of problems with this.

    I would just like to have a usercontrol which appends to the bottom and i can design the usercontrol according to my wish.


    Please help guys - any example would be highly appreciated...
    See more | Go to post

  • Digital certificate signature on windows applications?

    Hi Guys,
    Hopefully this should be a simple question.

    We have some executables which we developed but when we run it over the network it shows us a security on windows xp asking if we are sure we want to run.

    Ideally we would like to not have these warning message and to my understanding [please correct me if i am wrong], we need a digital certificate to sign our executables.

    1. Now being a layman...
    See more | Go to post

  • I agree but the problem i am having is that App1 never hangs. It is just that CloseMainWindow never delivers the close message to App1 [sometimes], so thats why i am sending cutom WM_CLOSE.

    Thanks anyways for your help....
    See more | Go to post

    Leave a comment:


  • I already used those. Anyways i found a way yo dll import user32.dll and send WM_CLOSE manually - rather than via .Net code.
    See more | Go to post

    Leave a comment:


  • alag20
    started a topic Process.CloseMainProgram() - not always working

    Process.CloseMainProgram() - not always working

    Hi Guys,
    I am having a problem here and need some urgent help from anyone possible??


    I have Application 1 which triggers Application 2. Application 2 runs some checks and if it is validated, it closes Application 1. Hence i need to close Application 1 from Application 2.

    Now i have process.CloseMa inProgram() in Application 2 which works most of the time, but it sometimes leaves Application 1 running. I have...
    See more | Go to post
No activity results to display
Show More
Working...