problems calling a function contained in a dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan

    #1

    problems calling a function contained in a dll

    Good afternoon,

    I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
    that was supplied to me by another company. They have supplied me with
    test code, which causes my program to crash, see below:

    #include "stdafx.h"
    #include "stdio.h"
    #include "stdlib.h"
    #include <windows.h>



    typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
    short usBaud_);

    int _tmain(int argc, _TCHAR* argv[])
    {

    HINSTANCE hDLLInstance;

    _ANT_Init ANT_Init;

    printf("Attempt ing to load DLL\n");
    hDLLInstance = LoadLibraryA("A NT_DLL.dll");

    if (hDLLInstance == NULL)
    {

    fprintf(stderr, "ERROR: Unable to load DLL\n");
    return 1;

    }

    else
    {

    printf("Success : Loaded ANT_DLL.dll\n") ;

    }


    ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
    if (ANT_Init(0, 50000) == true)
    {
    printf("Success : ANT Initialized Properly\n");
    }
    else
    {
    printf("Fail: ANT Interface not found\n");
    }



    FreeLibrary(hDL LInstance);

    printf("ANT DLL Freed\n");

    return 0;

    }


    Whenever my program crashes, I get the following error message
    "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
    violation reading location 0x00000000."

    The company that supplied me, with the dll, say that they compiled it,
    with Borland C++. They also told me that to get my program to link the
    windows.h file in properly, that I need to have Windows PSDK installed
    .. I've downloaded the latter of the Microsoft web site, but I still get
    the same error. From the following screen shot, you can see, that SDK
    seems to be installed correctly on my computer.

    Do you have any suggestions? Thanks in advance for your help,

    Regards,

    Alan

  • Bill Medland

    #2
    Re: problems calling a function contained in a dll

    Alan wrote:
    Good afternoon,
    >
    I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
    that was supplied to me by another company. They have supplied me with
    test code, which causes my program to crash, see below:
    >
    #include "stdafx.h"
    #include "stdio.h"
    #include "stdlib.h"
    #include <windows.h>
    >
    >
    >
    typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
    short usBaud_);
    >
    int _tmain(int argc, _TCHAR* argv[])
    {
    >
    HINSTANCE hDLLInstance;
    >
    _ANT_Init ANT_Init;
    >
    printf("Attempt ing to load DLL\n");
    hDLLInstance = LoadLibraryA("A NT_DLL.dll");
    >
    if (hDLLInstance == NULL)
    {
    >
    fprintf(stderr, "ERROR: Unable to load DLL\n");
    return 1;
    >
    }
    >
    else
    {
    >
    printf("Success : Loaded ANT_DLL.dll\n") ;
    >
    }
    >
    >
    ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
    if (ANT_Init == NULL)
    {
    fprintf(stderr, "ERROR: Unable to find the _ANT_Init function in the
    DLL\n");
    return 1;
    }
    if (ANT_Init(0, 50000) == true)
    Beware. Seeing this sort of test always scares me. I would suggest that
    if (ANT_Init(0, 50000) != false) would be safer although I would use
    if (ANT_Init(0, 50000)) myself.
    {
    printf("Success : ANT Initialized Properly\n");
    }
    else
    {
    printf("Fail: ANT Interface not found\n");
    }
    >
    >
    >
    FreeLibrary(hDL LInstance);
    >
    printf("ANT DLL Freed\n");
    >
    return 0;
    >
    }
    >
    >
    Whenever my program crashes, I get the following error message
    "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
    violation reading location 0x00000000."
    >
    The company that supplied me, with the dll, say that they compiled it,
    with Borland C++. They also told me that to get my program to link the
    windows.h file in properly, that I need to have Windows PSDK installed
    . I've downloaded the latter of the Microsoft web site, but I still get
    the same error. From the following screen shot, you can see, that SDK
    seems to be installed correctly on my computer.
    >
    Do you have any suggestions? Thanks in advance for your help,
    >
    Regards,
    >
    Alan
    If this does not show that the problem is not finding the funtion then I
    expect the error is within ANT_Init and I would use the debugger to prove
    it and pass the problem back to the third party.
    --
    Bill Medland

    Comment

    • Alan

      #3
      Re: problems calling a function contained in a dll

      Hi Bill,

      Thank you for your post. I don't think my problem is related to the
      test of the value returned by ANT_Init, as I've tried to call this
      function by itself, without testing the value returned and it did the
      same thing.

      Within the debugger, I'm able to place a breakpoint next to this line
      of code, but whenever I ask it, to "step into" the function, the error
      message appears.

      Any other suggestions?

      Thanks again,

      Alan


      Bill Medland wrote:
      Alan wrote:
      >
      Good afternoon,

      I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
      that was supplied to me by another company. They have supplied me with
      test code, which causes my program to crash, see below:

      #include "stdafx.h"
      #include "stdio.h"
      #include "stdlib.h"
      #include <windows.h>



      typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
      short usBaud_);

      int _tmain(int argc, _TCHAR* argv[])
      {

      HINSTANCE hDLLInstance;

      _ANT_Init ANT_Init;

      printf("Attempt ing to load DLL\n");
      hDLLInstance = LoadLibraryA("A NT_DLL.dll");

      if (hDLLInstance == NULL)
      {

      fprintf(stderr, "ERROR: Unable to load DLL\n");
      return 1;

      }

      else
      {

      printf("Success : Loaded ANT_DLL.dll\n") ;

      }


      ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
      >
      if (ANT_Init == NULL)
      {
      fprintf(stderr, "ERROR: Unable to find the _ANT_Init function in the
      DLL\n");
      return 1;
      }
      if (ANT_Init(0, 50000) == true)
      >
      Beware. Seeing this sort of test always scares me. I would suggest that
      if (ANT_Init(0, 50000) != false) would be safer although I would use
      if (ANT_Init(0, 50000)) myself.
      >
      {
      printf("Success : ANT Initialized Properly\n");
      }
      else
      {
      printf("Fail: ANT Interface not found\n");
      }



      FreeLibrary(hDL LInstance);

      printf("ANT DLL Freed\n");

      return 0;

      }


      Whenever my program crashes, I get the following error message
      "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
      violation reading location 0x00000000."

      The company that supplied me, with the dll, say that they compiled it,
      with Borland C++. They also told me that to get my program to link the
      windows.h file in properly, that I need to have Windows PSDK installed
      . I've downloaded the latter of the Microsoft web site, but I still get
      the same error. From the following screen shot, you can see, that SDK
      seems to be installed correctly on my computer.

      Do you have any suggestions? Thanks in advance for your help,

      Regards,

      Alan
      If this does not show that the problem is not finding the funtion then I
      expect the error is within ANT_Init and I would use the debugger to prove
      it and pass the problem back to the third party.
      --
      Bill Medland

      Comment

      • Keith Thompson

        #4
        Re: problems calling a function contained in a dll

        "Alan" <alan_ball007@y ahoo.co.ukwrite s:
        I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
        [snip]

        Sorry, you're in the wrong place. Try a Windows-related newsgroup.
        comp.os.ms-windows.program mer.win32 *might* be the right place.

        --
        Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
        San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
        We must do something. This is something. Therefore, we must do this.

        Comment

        • Ancient_Hacker

          #5
          Re: problems calling a function contained in a dll


          Alan wrote:
          Good afternoon,
          >
          I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
          that was supplied to me by another company. They have supplied me with
          test code, which causes my program to crash, see below:
          typedef bool (__fastcall * _ANT_Init)(unsi gned char ucUSB_, unsigned
          short usBaud_);

          Urp, I looked up __fastcall to refresh my memory. It's one of the
          flakier "standards" . In bold face text the doc states "this method may
          change in future compilers".

          What likely happened is your vendor compiled the DLL with a compiler
          that followed the __fastcall convention, as it was understood in 1998
          or thereabouts by Borland.

          Now your relatively new 2003 compiler from their arch-competitor may
          have changed the rules for __stdcall, so the parameter expected in edx
          register may be being passed somehow else.

          I'd go and find the exact same compiler your vendor used and that will
          probably work.
          meanwhile suggest to your vendor they move to a more modern compiler.

          Comment

          • jacob navia

            #6
            Re: problems calling a function contained in a dll

            Alan wrote:
            Good afternoon,
            >
            I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
            that was supplied to me by another company. They have supplied me with
            test code, which causes my program to crash, see below:
            >
            #include "stdafx.h"
            #include "stdio.h"
            #include "stdlib.h"
            #include <windows.h>
            >
            >
            >
            typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
            short usBaud_);
            >
            int _tmain(int argc, _TCHAR* argv[])
            {
            >
            HINSTANCE hDLLInstance;
            >
            _ANT_Init ANT_Init;
            >
            printf("Attempt ing to load DLL\n");
            hDLLInstance = LoadLibraryA("A NT_DLL.dll");
            >
            if (hDLLInstance == NULL)
            {
            >
            fprintf(stderr, "ERROR: Unable to load DLL\n");
            return 1;
            >
            }
            >
            else
            {
            >
            printf("Success : Loaded ANT_DLL.dll\n") ;
            >
            }
            >
            >
            ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
            NOWHERE you test if GetProcAddress returns NULL (meaning it did not find
            the function)

            if (ANT_Init(0, 50000) == true)
            {
            printf("Success : ANT Initialized Properly\n");
            }
            else
            {
            printf("Fail: ANT Interface not found\n");
            }
            >
            >
            >
            FreeLibrary(hDL LInstance);
            >
            printf("ANT DLL Freed\n");
            >
            return 0;
            >
            }
            >
            >
            Whenever my program crashes, I get the following error message
            "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
            violation reading location 0x00000000."
            >
            You have tried to execute a NULL pointer. Look at this:
            "Unhandled exception at 0x00000000 in program.exe
            This means that you have a NULL function pointer and you try to execute
            it. See above.

            The company that supplied me, with the dll, say that they compiled it,
            with Borland C++. They also told me that to get my program to link the
            windows.h file in properly, that I need to have Windows PSDK installed
            . I've downloaded the latter of the Microsoft web site, but I still get
            the same error. From the following screen shot, you can see, that SDK
            seems to be installed correctly on my computer.
            >
            Do you have any suggestions? Thanks in advance for your help,
            >
            Regards,
            >
            Alan
            >

            HINT
            Are you sure you should put the underscore in the function name???
            ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
            if (ANT_Init == NULL) {
            // Try without underscore
            ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "ANT_Init") ;
            if (ANT_Init == NULL) {
            printf("Error. Unable to find ANT_Init in the dll\n");
            exit(-1);
            }

            }

            Comment

            • jacob navia

              #7
              Re: problems calling a function contained in a dll

              Ancient_Hacker wrote:
              Alan wrote:
              >
              >>Good afternoon,
              >>
              >>I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
              >>that was supplied to me by another company. They have supplied me with
              >>test code, which causes my program to crash, see below:
              >
              >
              >
              >>typedef bool (__fastcall * _ANT_Init)(unsi gned char ucUSB_, unsigned
              >>short usBaud_);
              >
              >
              >
              Urp, I looked up __fastcall to refresh my memory. It's one of the
              flakier "standards" . In bold face text the doc states "this method may
              change in future compilers".
              >
              What likely happened is your vendor compiled the DLL with a compiler
              that followed the __fastcall convention, as it was understood in 1998
              or thereabouts by Borland.
              >
              Now your relatively new 2003 compiler from their arch-competitor may
              have changed the rules for __stdcall, so the parameter expected in edx
              register may be being passed somehow else.
              >
              I'd go and find the exact same compiler your vendor used and that will
              probably work.
              meanwhile suggest to your vendor they move to a more modern compiler.
              >
              This could be an error, but I think it is more likely he has a
              NULL result from GetProcAddress since

              Unhandled exception at 0x00000000 in program.exe.

              This means the program counter is zero, i;e. the typicall result when
              you execute a NULL pointer as a function pointer

              Comment

              • Ancient_Hacker

                #8
                Re: problems calling a function contained in a dll

                good eyes!

                Yep, you should always check to see that the function was found before
                trying to call it.

                Often there's some glitch having to do with underscores extra or
                missing, or name capitalization. The name has to exactly match the
                name exported by the DLL.

                Use something like dumpbin /exports vendor.DLL to see the exact
                exported names.

                Comment

                • CBFalconer

                  #9
                  Re: problems calling a function contained in a dll

                  Alan wrote:
                  >
                  I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
                  that was supplied to me by another company. They have supplied me with
                  test code, which causes my program to crash, see below:
                  If the actual compiler or system is relevant, the whole question is
                  off-topic here. In particular the C standard makes no mention of
                  'dll'. In addition, most identifier names beginning with '_' are
                  reserved for the compiler implementor. Use yields undefined
                  behaviour, which includes crashes.
                  >
                  #include "stdafx.h"
                  #include "stdio.h"
                  #include "stdlib.h"
                  #include <windows.h>
                  >
                  typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
                  short usBaud_);
                  >
                  int _tmain(int argc, _TCHAR* argv[])
                  {
                  >
                  HINSTANCE hDLLInstance;
                  >
                  _ANT_Init ANT_Init;
                  >
                  printf("Attempt ing to load DLL\n");
                  hDLLInstance = LoadLibraryA("A NT_DLL.dll");
                  >
                  if (hDLLInstance == NULL)
                  {
                  fprintf(stderr, "ERROR: Unable to load DLL\n");
                  return 1;
                  }
                  >
                  else
                  {
                  printf("Success : Loaded ANT_DLL.dll\n") ;
                  }
                  >
                  ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
                  if (ANT_Init(0, 50000) == true)
                  {
                  printf("Success : ANT Initialized Properly\n");
                  }
                  else
                  {
                  printf("Fail: ANT Interface not found\n");
                  }
                  >
                  FreeLibrary(hDL LInstance);
                  >
                  printf("ANT DLL Freed\n");
                  >
                  return 0;
                  }
                  >
                  Whenever my program crashes, I get the following error message
                  "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
                  violation reading location 0x00000000."
                  >
                  The company that supplied me, with the dll, say that they compiled it,
                  with Borland C++. They also told me that to get my program to link the
                  windows.h file in properly, that I need to have Windows PSDK installed
                  . I've downloaded the latter of the Microsoft web site, but I still get
                  the same error. From the following screen shot, you can see, that SDK
                  seems to be installed correctly on my computer.
                  If you ever included a binary attachment, such as a screen shot,
                  luckily your ISP was smart enough to delete it, so we don't have to
                  yell at you.

                  Compilation yields the following errors:

                  [1] c:\c\junk>cc -c -o junk.o junk.c
                  junk.c:1:20: stdafx.h: No such file or directory (ENOENT)
                  junk.c:4:21: windows.h: No such file or directory (ENOENT)
                  junk.c:8: parse error before '*' token
                  junk.c:9: warning: type defaults to `int' in declaration of `bool'
                  junk.c:9: `bool' declared as function returning a function
                  junk.c:11: parse error before "_TCHAR"
                  junk.c: In function `_tmain':
                  junk.c:14: `HINSTANCE' undeclared (first use in this function)
                  junk.c:14: (Each undeclared identifier is reported only once
                  junk.c:14: for each function it appears in.)
                  junk.c:14: parse error before "hDLLInstan ce"
                  junk.c:16: `_ANT_Init' undeclared (first use in this function)
                  junk.c:19: `hDLLInstance' undeclared (first use in this function)
                  junk.c:19: warning: implicit declaration of function `LoadLibraryA'
                  junk.c:37: `ANT_Init' undeclared (first use in this function)
                  junk.c:37: parse error before "GetProcAddress "
                  junk.c:38: `ANT_Init' used prior to declaration
                  junk.c:38: warning: implicit declaration of function `ANT_Init'
                  junk.c:38: `true' undeclared (first use in this function)
                  junk.c:49: warning: implicit declaration of function `FreeLibrary'

                  When you submit properly standard C code in a compilable form,
                  complete with a 'main', someone will be happy to critique it.

                  --
                  Chuck F (cbfalconer at maineline dot net)
                  Available for consulting/temporary embedded and systems.
                  <http://cbfalconer.home .att.net>


                  Comment

                  • Alan

                    #10
                    Re: problems calling a function contained in a dll

                    Thank you for your post. I think you've come up with a good reason why
                    my program doesn't work. They told me today, that they used Borland C++
                    5. I downloaded an evaluation version of Borland C++ 6 and it didn't
                    work either.

                    Thanks again,

                    Alan


                    Ancient_Hacker wrote:
                    Alan wrote:
                    Good afternoon,

                    I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
                    that was supplied to me by another company. They have supplied me with
                    test code, which causes my program to crash, see below:
                    >
                    >
                    typedef bool (__fastcall * _ANT_Init)(unsi gned char ucUSB_, unsigned
                    short usBaud_);
                    >
                    >
                    Urp, I looked up __fastcall to refresh my memory. It's one of the
                    flakier "standards" . In bold face text the doc states "this method may
                    change in future compilers".
                    >
                    What likely happened is your vendor compiled the DLL with a compiler
                    that followed the __fastcall convention, as it was understood in 1998
                    or thereabouts by Borland.
                    >
                    Now your relatively new 2003 compiler from their arch-competitor may
                    have changed the rules for __stdcall, so the parameter expected in edx
                    register may be being passed somehow else.
                    >
                    I'd go and find the exact same compiler your vendor used and that will
                    probably work.
                    meanwhile suggest to your vendor they move to a more modern compiler.

                    Comment

                    • Alan

                      #11
                      Re: problems calling a function contained in a dll

                      You don't have the dll, which I use or the header files, which is why
                      it doesn't compile...


                      CBFalconer wrote:
                      Alan wrote:

                      I'm having difficulties loading a dll in Microsoft Visual Studio 2003,
                      that was supplied to me by another company. They have supplied me with
                      test code, which causes my program to crash, see below:
                      >
                      If the actual compiler or system is relevant, the whole question is
                      off-topic here. In particular the C standard makes no mention of
                      'dll'. In addition, most identifier names beginning with '_' are
                      reserved for the compiler implementor. Use yields undefined
                      behaviour, which includes crashes.
                      >

                      #include "stdafx.h"
                      #include "stdio.h"
                      #include "stdlib.h"
                      #include <windows.h>

                      typedef bool (__fastcall* _ANT_Init)(unsi gned char ucUSB_, unsigned
                      short usBaud_);

                      int _tmain(int argc, _TCHAR* argv[])
                      {

                      HINSTANCE hDLLInstance;

                      _ANT_Init ANT_Init;

                      printf("Attempt ing to load DLL\n");
                      hDLLInstance = LoadLibraryA("A NT_DLL.dll");

                      if (hDLLInstance == NULL)
                      {
                      fprintf(stderr, "ERROR: Unable to load DLL\n");
                      return 1;
                      }

                      else
                      {
                      printf("Success : Loaded ANT_DLL.dll\n") ;
                      }

                      ANT_Init = (_ANT_Init)GetP rocAddress(hDLL Instance, "_ANT_Init" );
                      if (ANT_Init(0, 50000) == true)
                      {
                      printf("Success : ANT Initialized Properly\n");
                      }
                      else
                      {
                      printf("Fail: ANT Interface not found\n");
                      }

                      FreeLibrary(hDL LInstance);

                      printf("ANT DLL Freed\n");

                      return 0;
                      }

                      Whenever my program crashes, I get the following error message
                      "Unhandled exception at 0x00000000 in program.exe: 0xC0000005: Access
                      violation reading location 0x00000000."

                      The company that supplied me, with the dll, say that they compiled it,
                      with Borland C++. They also told me that to get my program to link the
                      windows.h file in properly, that I need to have Windows PSDK installed
                      . I've downloaded the latter of the Microsoft web site, but I still get
                      the same error. From the following screen shot, you can see, that SDK
                      seems to be installed correctly on my computer.
                      >
                      If you ever included a binary attachment, such as a screen shot,
                      luckily your ISP was smart enough to delete it, so we don't have to
                      yell at you.
                      >
                      Compilation yields the following errors:
                      >
                      [1] c:\c\junk>cc -c -o junk.o junk.c
                      junk.c:1:20: stdafx.h: No such file or directory (ENOENT)
                      junk.c:4:21: windows.h: No such file or directory (ENOENT)
                      junk.c:8: parse error before '*' token
                      junk.c:9: warning: type defaults to `int' in declaration of `bool'
                      junk.c:9: `bool' declared as function returning a function
                      junk.c:11: parse error before "_TCHAR"
                      junk.c: In function `_tmain':
                      junk.c:14: `HINSTANCE' undeclared (first use in this function)
                      junk.c:14: (Each undeclared identifier is reported only once
                      junk.c:14: for each function it appears in.)
                      junk.c:14: parse error before "hDLLInstan ce"
                      junk.c:16: `_ANT_Init' undeclared (first use in this function)
                      junk.c:19: `hDLLInstance' undeclared (first use in this function)
                      junk.c:19: warning: implicit declaration of function `LoadLibraryA'
                      junk.c:37: `ANT_Init' undeclared (first use in this function)
                      junk.c:37: parse error before "GetProcAddress "
                      junk.c:38: `ANT_Init' used prior to declaration
                      junk.c:38: warning: implicit declaration of function `ANT_Init'
                      junk.c:38: `true' undeclared (first use in this function)
                      junk.c:49: warning: implicit declaration of function `FreeLibrary'
                      >
                      When you submit properly standard C code in a compilable form,
                      complete with a 'main', someone will be happy to critique it.
                      >
                      --
                      Chuck F (cbfalconer at maineline dot net)
                      Available for consulting/temporary embedded and systems.
                      <http://cbfalconer.home .att.net>

                      Comment

                      • Mark McIntyre

                        #12
                        Re: problems calling a function contained in a dll

                        On 27 Oct 2006 12:20:33 -0700, in comp.lang.c , "Alan"
                        <alan_ball007@y ahoo.co.ukwrote :
                        >You don't have the dll, which I use or the header files, which is why
                        >it doesn't compile...
                        It doesn't compile because it uses nonstandard extensions to C, which,
                        as CBF mentioned, are offtopic here. You need to ask in a microsoft
                        programming grupo (despite using Borland, its still an MS
                        environment).

                        Also please don't top-post in CLC.

                        CBF Wrote
                        >>In addition, most identifier names beginning with '_' are
                        >reserved for the compiler implementor. Use yields undefined
                        >behaviour, which includes crashes.
                        <nit>
                        This is incorrect. Since the idenfiier names in question are provided
                        by the compiler implementor, there is no UB.
                        </nit>

                        --
                        Mark McIntyre

                        "Debugging is twice as hard as writing the code in the first place.
                        Therefore, if you write the code as cleverly as possible, you are,
                        by definition, not smart enough to debug it."
                        --Brian Kernighan

                        Comment

                        • Kenny McCormack

                          #13
                          Re: problems calling a function contained in a dll

                          In article <1161976833.455 052.81960@b28g2 000cwb.googlegr oups.com>,
                          Alan <alan_ball007@y ahoo.co.ukwrote :
                          >You don't have the dll, which I use or the header files, which is why
                          >it doesn't compile...
                          Um, Alan, you're being trolled. They pretend that your code is
                          defective, because they can't compile it with their crippled compilers
                          (aka, development environments) - crippled, quite often, by their using
                          goofy compiler options (like -ansi and/or -pedantic) that turn off most
                          of the functionality of the compiler (aka, development environment).

                          Pay them no mind. Just move on.

                          Comment

                          • CBFalconer

                            #14
                            Re: problems calling a function contained in a dll

                            Alan wrote:
                            >
                            You don't have the dll, which I use or the header files, which is
                            why it doesn't compile...
                            Don't top-post here. Of course I don't have the dll, this
                            newsgroup deals with standard C, which has no knowledge of dlls or
                            arbitrary headers. One reason 'it' doesn't compile is that it is
                            not written in standard C.

                            For things to do with dll's seek a newsgroup with 'Mickeysoft' or
                            something like that in its name.

                            --
                            Chuck F (cbfalconer at maineline dot net)
                            Available for consulting/temporary embedded and systems.
                            <http://cbfalconer.home .att.net>


                            Comment

                            • Kenny McCormack

                              #15
                              Re: problems calling a function contained in a dll

                              In article <45427EB4.82D3C 972@yahoo.com>,
                              CBFalconer <cbfalconer@mai neline.netwrote :
                              >Alan wrote:
                              >>
                              >You don't have the dll, which I use or the header files, which is
                              >why it doesn't compile...
                              >
                              >Don't top-post here. Of course I don't have the dll, this
                              >newsgroup deals with standard C, which has no knowledge of dlls or
                              >arbitrary headers. One reason 'it' doesn't compile is that it is
                              >not written in standard C.
                              Most likely, the reason you couldn't compile it, besides not having the
                              DLL, is that you've hobbled your compiler with some weird command line
                              options.

                              Comment

                              Working...