Thread: Problem in returning value from the dll exported function

  1. #1
    Registered User
    Join Date
    Nov 2006

    Problem in returning value from the dll exported function

    Hi all,

    I have a C function in my dll workspace. This function is exported from the dll. I want to return value from the function. The value is of enum type. The declaration and the defination of this enum type variable is in some different .h file. so how should i export this function and get the return value.

    I have exported the function by using the following statement.

    __declspec(dllexport) rs_result rdiff_sig(const char *BasisPath, const char *SigPath);

    i am getting error messages and they are :

    error C2146: syntax error : missing ';' before identifier 'rdiff_sig'
    error C2501: 'rs_result' : missing storage-class or type specifiers
    fatal error C1004: unexpected end of file found

    How should i solve this issue.

    Please help me.



  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Banks of the River Styx
    Are you #include'ing the declaration/definition of the rs_result type into that header file? The compiler needs to know what "rs_result" is...
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    Registered User
    Join Date
    Nov 2006
    After including the .h file it worked. thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  2. doubt in c parser coding
    By akshara.sinha in forum C Programming
    Replies: 4
    Last Post: 12-23-2007, 01:49 PM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. DLL Function / Load Library Problem
    By cboard_member in forum Windows Programming
    Replies: 5
    Last Post: 12-10-2005, 10:11 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM