Re: 3rd party evc++ dll help

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Below is the .h file I was given for reference.

Thanks again for all your help

Mo
=====================================================================================


#pragma once

// The following ifdef block is the standard way of creating macros
which make exporting
// from a DLL simpler. All files within this DLL are compiled with the
EPLAUNCHERLIB_EXPORTS
// symbol defined on the command line. this symbol should not be
defined on any project
// that uses this DLL. This way any other project whose source files
include this file see
// EPLAUNCHERLIB_API functions as being imported from a DLL, wheras
this DLL sees symbols
// defined with this macro as being exported.
#ifdef EPLAUNCHERLIB_EXPORTS
#define EPLAUNCHERLIB_API __declspec(dllexport)
#pragma message("epLauncherLib - exporting symbols")
#else
#define EPLAUNCHERLIB_API __declspec(dllimport)
#pragma message("epLauncherLib - importing symbols")

#endif

typedef unsigned long UInt32;
typedef int Err ;


#ifdef __cplusplus
extern "C" {
#endif



//Error Codes
typedef enum
{
epErrInternal = -1 ,
epErrSuccess = 0,
epErrAppNotFound ,
epErrInvalidData,
} epErrCodes;


/*
* Common app creator ID's
*/

#define EP_APP_RX 'nc-2'
#define EP_APP_DX 'nc52'
#define EP_APP_ID 'nc43'
#define EP_APP_TABLE 'ep23'
#define EP_APP_LAB 'ep24'
#define EP_APP_MEDTOOLS 'eMPL'



/***********Launching app side****************/

/**
* Launches specified app
*
* @param creator target app creator id
* @param arg target app argument
* @return error for app not found or unable to write argument
* Note: The last element of arg[] MUST be Null.
*/
EPLAUNCHERLIB_API Err epLaunchApp(UInt32 creator, LPCWSTR arg[]);


/**
* Launch target app with normal launch flag
*
* @param creator target app creator id
* @return error for app not found or unable to write argument
*/
EPLAUNCHERLIB_API Err epNormalLaunchApp(UInt32 creator);




#ifdef __cplusplus
}
#endif

.



Relevant Pages

  • Re: How to spy global mouse & keyboard event?
    ... the #pragma is only a fraction of the problem. ... you have to cause the data segment to be shared ... know if I should disconnect the hook if the DLL is being unloaded. ... shared DLL, as this can cause injection of the entire MFC DLL into each process, so MFC ...
    (microsoft.public.vc.mfc)
  • Re: SetWindowsHookEx and WH_MOUSE
    ... Alright, Igor, my friend, one more question if I may. ... #pragma data_seg ... LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) ... just want a message box to indicate that the DLL has noted a WM_LBUTTONUP. ...
    (microsoft.public.vc.language)
  • Re: Sharing data between apps via DLL
    ... App2: Metatrader 4. ... I can send data to the DLL, do some math, and send back to the same ... pragma data_seg is ignored. ... Not sure why you need a .def file; ...
    (microsoft.public.vc.mfc)
  • Re: Global variable inside a DLL
    ... Please don't use #pragma sectionshared sections. ... risk waiting to happen because any unprivileged user on the same Terminal ... Server session can load the binary and poke at your data. ... clients that access the DLL? ...
    (microsoft.public.win32.programmer.kernel)