+ Reply to Thread
Results 1 to 2 of 2

Thread: How to export data from a DLL?

  1. #1

    How to export data from a DLL?

    Hi All,

    I want to export some data from my DLL.

    How to achieve this?

    Please help.

  2. #2
    It is possible to export data from the DLL.

    Follow below steps:
    a. Create a DLL.
    b. Create a header file
    c. Copy below code:

    Code:
    #ifdef __cplusplus
    extern "C"
    {
    #endif
    
    extern __declspec(dllexport) int nTestDataExport;
    
    
    #ifdef __cplusplus
    }
    #endif
    d. Create a source file
    e. Copy below code

    Code:
    __declspec(dllexport) int nTestDataExport = 0 ;
    f. You are ready to use this data outsize DLL.

    Thanks.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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