dllfuncs.cpp
来自「本人买的<<VC++项目开发实例>>源代码配套光盘.」· C++ 代码 · 共 312 行
CPP
312 行
// DLLFuncs.cpp: implementation of the CDLLFuncs class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DBExp.h"
#include "DLLFuncs.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
//##ModelId=3CA0A1F2034C
CDLLFuncs::CDLLFuncs()
{
}
//##ModelId=3CA0A1F20354
CDLLFuncs::~CDLLFuncs()
{
}
//注意:下面的这个声明非常的关键
//##ModelId=3CCC32470228
typedef int (__stdcall * P_OPEN_DIALOG)(HWND hWnd);
//##ModelId=3CCC32470246
typedef P_OPEN_DIALOG P_OPEN_OPTION_DIALOG;
//##ModelId=3CCC3247026E
typedef int (__stdcall * P_OPEN_DIALOG_1)(HWND hWnd, LPARAM params);
//##ModelId=3CDCDA59038C
typedef const char *(__stdcall *P_TABLE_DDL)(const char *strDatabaseType, const char *strConnectString, const char *strOwnerName, const char *strTableName, LPARAM lParam);
//##ModelId=3CA0A1F20341
BOOL CDLLFuncs::OpenOptionDialog(HWND hWnd)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("optdlg.dll");
ASSERT(hDLL);
//注意:下面的这个声明非常的关键
typedef int (__stdcall * P_OPEN_OPTION_DIALOG)(HWND hWnd);
P_OPEN_OPTION_DIALOG proc = (P_OPEN_OPTION_DIALOG)GetProcAddress(hDLL, "OpenOptionDialog");
ASSERT(proc);
return proc(hWnd);
}
//##ModelId=3CD24B10033D
BOOL CDLLFuncs::BCB_GetRecordCount(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "BCB_GetRecordCount");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CCC3244022E
BOOL CDLLFuncs::Table_NewIndex(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
int ret = GetLastError();
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "Table_NewIndex");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CD24B10035B
BOOL CDLLFuncs::BCB_NewTrigger(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "Table_NewIndex");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CD24B100315
int CDLLFuncs::BCB_ModifyTableStructure(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "BCB_ModifyTableStructure");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CD24B1002ED
int CDLLFuncs::BCB_ExportTable(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "BCB_ExportTable");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CD24B1002BB
int CDLLFuncs::BCB_GenerateScript(HWND hWnd, LPARAM params)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "BCB_GenerateScript");
ASSERT(proc);
return proc(hWnd, params);
}
//##ModelId=3CD94FFA004E
int CDLLFuncs::View_RecCount(HWND hWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_RecCount");
ASSERT(proc);
return proc(hWnd, lParam);
}
//##ModelId=3CD94FFA0030
int CDLLFuncs::View_GetRecordSet(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_GetRecordSet");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FFA0008
int CDLLFuncs::View_Definition(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_Definition");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF903D1
int CDLLFuncs::View_Property(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_Property");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF903A9
int CDLLFuncs::View_GenerateScript(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_GenerateScript");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF9038B
int CDLLFuncs::SP_Execute(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("SPFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "SP_Execute");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF9036D
int CDLLFuncs::SP_Definition(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("SPFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "SP_Definition");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF90345
int CDLLFuncs::SP_GenerateScript(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("SPFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "SP_GenerateScript");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CD94FF90313
int CDLLFuncs::SP_Property(HWND hParentWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("SPFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "SP_Property");
ASSERT(proc);
return proc(hParentWnd, lParam);
}
//##ModelId=3CDCDA5602F2
const char * CDLLFuncs::GetTableDDL(const char *strDatabaseType, const char *strConnectString, const char *strOwnerName, const char *strTableName, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableDDL.dll");
ASSERT(hDLL);
P_TABLE_DDL proc = (P_TABLE_DDL)GetProcAddress(hDLL, "GetTableDDL");
ASSERT(proc);
return proc(strDatabaseType, strConnectString, strOwnerName, strTableName, lParam);
}
int CDLLFuncs::View_Create(HWND hWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("ViewFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "View_Create");
ASSERT(proc);
return proc(hWnd, lParam);
}
int CDLLFuncs::SP_Create(HWND hWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("SPFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "SP_Create");
ASSERT(proc);
return proc(hWnd, lParam);
}
int CDLLFuncs::Table_Create(HWND hWnd, LPARAM lParam)
{
/*在第一次的时候会被初始化,以后的就不再需要了!!!*/static HINSTANCE hDLL = AfxLoadLibrary("TableFunc.dll");
ASSERT(hDLL);
P_OPEN_DIALOG_1 proc = (P_OPEN_DIALOG_1)GetProcAddress(hDLL, "Table_Create");
ASSERT(proc);
return proc(hWnd, lParam);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?