I created a Dll project. I created a myasm.asm file that has one function:
.486
.model flat, stdcall
.code
MyProc1 proc x: DWORD, y: DWORD
xor eax,eax
//......//
ret
MyProc1 endp
end
There is my heade file:
#pragma once
#include <Windows.h>
#ifdef LAB1DLL_EXPORTS
#define LAB1DLL_API __declspec(dllexport)
#else
#define LAB1DLL_API __declspec(dllimport)
#endif
extern "C"
{
LAB1DLL_API int _stdcall MyProc1(DWORD x, DWORD y);
}
And dllMain (begging) "
#define LAB1DLL_EXPORTS 1
#include "Lab1Dll.h"
I got my test application in which I want to use this DLL and exported the function that I have:
#include "Lab1Dll.h"
But my dll does not export my function MyProc1. If I add a βnormalβ function to this DLL and exprot, it will be avilable in my Test application, and the compilation process of the DLL creates a lib file.
Without the "normal" functions, I do not get a .lib file. And I can not reference this library.
How to make this exported function work? Or how to do it first?
UPDATE:
, .def . . . , __declspec (dllexport)?
LIBRARY
EXPORTS
MyProc1