Jump to content

Autoit_Win32_Dll.dll


wolf9228
 Share

Recommended Posts

ALL FILES

Projects

Autoit_Win32_Dll.dll

Autoit_Win32_Dll.AU3

http://www.2shared.com/file/4295058/db0d54..._Win32_Dll.html

Autoit_Win32_Dll.cpp

// Autoit_Win32_Dll.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "Autoit_Win32_Dll.h"

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
        case DLL_PROCESS_ATTACH:
        case DLL_THREAD_ATTACH:
        case DLL_THREAD_DETACH:
        case DLL_PROCESS_DETACH:
            break;
    }
    return TRUE;
}


// This is an example of an exported variable
AUTOIT_WIN32_DLL_API int nAutoit_Win32_Dll=0;

// This is an example of an exported function.
AUTOIT_WIN32_DLL_API int fnAutoit_Win32_Dll(void)
{
    return 42;
}

// This is the constructor of a class that has been exported.
// see Autoit_Win32_Dll.h for the class definition
CAutoit_Win32_Dll::CAutoit_Win32_Dll()
{ 
    return; 
}


int MyMsgBox()
{ 
MessageBox(NULL, "Hello World", "Ok", NULL);
return 1;
}

Autoit_Win32_Dll.h

// 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 AUTOIT_WIN32_DLL_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 
// AUTOIT_WIN32_DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef AUTOIT_WIN32_DLL_EXPORTS
#define AUTOIT_WIN32_DLL_API __declspec(dllexport)
#else
#define AUTOIT_WIN32_DLL_API __declspec(dllimport)
#endif

// This class is exported from the Autoit_Win32_Dll.dll
class AUTOIT_WIN32_DLL_API CAutoit_Win32_Dll {
public:
    CAutoit_Win32_Dll(void);
    // TODO: add your methods here.
};

extern AUTOIT_WIN32_DLL_API int nAutoit_Win32_Dll;
AUTOIT_WIN32_DLL_API int fnAutoit_Win32_Dll(void);
extern "C" __declspec(dllexport) int MyMsgBox();

$dll = DllOpen(@ScriptDir & "\Autoit_Win32_Dll.dll")
$result = DllCall($dll, "int", "MyMsgBox")
DllClose($dll)
Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...