Results 1 to 4 of 4

Thread: argument to dll on execution

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    22

    argument to dll on execution

    Hi all.

    I need to send a string to my program upon execution. The string is a file name that the program needs to read.

    How can I do this?

    also... can I send the string to a dll? can the dll be executable?

    I suppose the program sholud be called from MS-DOS... but how do I type?

    And how do I code to accept the argument.

    I really need your help here guys!

    BIG LOVE!
    /David N. Sweden

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you dont execute dll's. You instanciate the dll from your app and pass whatever data you need as a parameter when calling a function in the dll.

    Sub Main in your exe can have a string array as a parameter. That arrayu will contain your command line arguements
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    22
    ok... thanks Cander...

    So how do I type if I want my applictaion to use "filenme.xml" in my application?

    something like (in cmd prompt)

    MyApp "filename.xml"?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    myapp filename.xml
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width