Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Win32 APIs

Win32 APIs

Scheduled Pinned Locked Moved Visual Basic
csharplinuxjsonquestion
5 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    P P Vilsad
    wrote on last edited by
    #1

    Hi, How do i run win32 api in a vb.net program, i declared shell execute function and tried to call it from my form. but it says unmanaged call is trying to run from managed code and something about PInvoke too. please advice me

    Vilsad P P MCTS (Windows Applications) .Net 2.0

    C T 2 Replies Last reply
    0
    • P P P Vilsad

      Hi, How do i run win32 api in a vb.net program, i declared shell execute function and tried to call it from my form. but it says unmanaged call is trying to run from managed code and something about PInvoke too. please advice me

      Vilsad P P MCTS (Windows Applications) .Net 2.0

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Process.Start will do that for you. In general, www.pinvoke.net is the place to find out how to call Win32 APIs

      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 )

      S P 2 Replies Last reply
      0
      • C Christian Graus

        Process.Start will do that for you. In general, www.pinvoke.net is the place to find out how to call Win32 APIs

        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 )

        S Offline
        S Offline
        Sonia Gupta
        wrote on last edited by
        #3

        the .net framework base class Imports System.Runtime.InteropServices will be remedy of this problem?????

        1 Reply Last reply
        0
        • C Christian Graus

          Process.Start will do that for you. In general, www.pinvoke.net is the place to find out how to call Win32 APIs

          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 )

          P Offline
          P Offline
          P P Vilsad
          wrote on last edited by
          #4

          Saying ShellExecute 0&,"Open",filepath,0&,0&,3 is what i want to execute. how can i do it with Process.Start ? can you show me an example? Thanks for your advice

          Vilsad P P MCTS (Windows Applications) .Net 2.0

          1 Reply Last reply
          0
          • P P P Vilsad

            Hi, How do i run win32 api in a vb.net program, i declared shell execute function and tried to call it from my form. but it says unmanaged call is trying to run from managed code and something about PInvoke too. please advice me

            Vilsad P P MCTS (Windows Applications) .Net 2.0

            T Offline
            T Offline
            theScorp
            wrote on last edited by
            #5

            If you want to call a specific function.. u can call as [DllImport("USER32.DLL")] public static extern int SendMessage(int hwnd, int msg, int character, String text);


            "If our Mind can, the Program can !!" ≡ ░Ŗǿђầŋ٭ ≡

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups