这个头文件怎么啦?请帮帮我....
KJoon 2014-02-27 04:11:30 使用QuickBurro中间件做服务端插件,需要包含头文件NodeServiceAPI.hpp。
问题是:只要静态链接VCL库(不选Build with runtime packages),编译通过,但在链接时,系统就会没完没了地要VCL组件的obj文件,forms.obj、db.obj、databkr.obj、adodb.obj...。我确信是这个头文件的问题,因为只要不包含它就天下太平。请大牛们帮帮我,这是怎么了?
#ifndef NodeServiceAPIHPP
#define NodeServiceAPIHPP
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <UserConnection.hpp> // Pascal unit
#include <DllSpread.hpp> // Pascal unit
#include <QBParcel.hpp> // Pascal unit
#include <Isapi.hpp> // Pascal unit
#include <ADODB.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <SysUtils.hpp> // Pascal unit
#include <SysInit.hpp> // Pascal unit
#include <System.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Nodeserviceapi
{
//-- type declarations -------------------------------------------------------
#pragma pack(push, 4)
struct TAdoConnectionRecord
{
Adodb::TADOConnection* AdoConnection;
AnsiString DatabaseId;
bool Used;
} ;
#pragma pack(pop)
#pragma pack(push, 4)
struct TAdoDatasetRecord
{
Adodb::TADODataSet* AdoDataset;
bool Used;
} ;
#pragma pack(pop)
#pragma pack(push, 4)
struct TAdoCommandRecord
{
Adodb::TADOCommand* AdoCommand;
bool Used;
} ;
#pragma pack(pop)
#pragma pack(push, 4)
struct TAdoStoredProcRecord
{
Adodb::TADOStoredProc* AdoStoredProc;
bool Used;
} ;
#pragma pack(pop)
typedef bool __stdcall (*TGetAdoProperty)(char * DatabaseId, int &ProviderPtr, int &ConnStrPtr);
typedef bool __stdcall (*TGetAdoConnection)(char * DatabaseId, int &PoolId, int &ConnectionId, Adoint::_di__Connection &_Conn);
typedef bool __stdcall (*TFreeAdoConnection)(int PoolId, int ConnectionId);
typedef bool __stdcall (*TSendToGlobalUser)(char * TargetUserId, int MsgParcelPtr);
typedef bool __stdcall (*TSendToGlobalNode)(char * TargetNodeId, int MsgParcelPtr);
typedef int __stdcall (*TGetUserList)(int UserStatus, int UserType);
typedef int __stdcall (*TGetNodeList)(int NodeStatus, int NodeType);
typedef int __stdcall (*TGetUserGroupList)(void);
typedef int __stdcall (*TGetGroupMemberList)(char * aGroupId);
typedef bool __stdcall (*TGetSysStatus)(int &StatusParcelPtr);
typedef bool __stdcall (*TIsValidWebUser)(char * UserId, char * UserPassword);
typedef bool __stdcall (*TGetWebSessionList)(int &CdsStreamPtr);
typedef int __stdcall (*TCreateWebSession)(char * AppName, char * ClientName, char * ClientIpAddress, int KeepingMinutes);
typedef bool __stdcall (*TIsValidWebSession)(char * AppName, char * aSessionId, char * ClientName, char * ClientIpAddress);
typedef bool __stdcall (*TRemoveWebSession)(char * AppName, char * aSessionId, char * ClientName, char * ClientIpAddress);
typedef int __stdcall (*TActiveWebSessions)(void);
typedef bool __stdcall (*TPutStoragedStatus)(char * aSessionId, char * StatusName, char * StatusValue);
typedef int __stdcall (*TGetStoragedStatus)(char * aSessionId, char * StatusName);
typedef bool __stdcall (*TRemoveStoragedStatus)(char * aSessionId, char * StatusName);
typedef bool __stdcall (*TAddQuerySession)(char * DbName, char * SQLCommand, bool EnableBCD, int KeepAliveSeconds, int &QueryId, int &QuerySessionId, int &AllRecords);
typedef bool __stdcall (*TValidQuerySession)(int QueryId, int SessionId);
typedef bool __stdcall (*TQueryPageData)(int QueryId, int QuerySessionId, int PageSize, int PageNumber, int &DataStreamPtr);
typedef bool __stdcall (*TQueryPageData2)(int QueryId, int QuerySessionId, int PageSize, int PageNumber, int &DataStreamPtr);
typedef bool __stdcall (*TQueryPageData3)(int QueryId, int QuerySessionId, int PageSize, int PageNumber, int &DataStreamPtr);
typedef bool __stdcall (*TRefreshQuerySession)(int QueryId, int SessionId);
typedef bool __stdcall (*TRemoveQuerySession)(int QueryId, int SessionId);
typedef bool __stdcall (*TGenerateKeyId)(char * DatabaseId, char * TableName, char * KeyFieldName, char * FilterCondition, char * FieldMask, char * ConstList, bool EnableBCD, int &NewKeyIdPtr);
typedef bool __stdcall (*TFreeKeyId)(char * DatabaseId, char * TableName, char * KeyFieldName, char * FilterCondition, char * IdToFree);
typedef bool __stdcall (*TPutCommonParameter)(char * ParameterName, char * ParameterValue);
typedef int __stdcall (*TGetCommonParameter)(char * ParameterName);
typedef bool __stdcall (*TRemoveCommonParameter)(char * ParameterName);
typedef void __stdcall (*TSetWSEnable)(bool Enable);
typedef bool __stdcall (*TSetWSSessionProperty)(__int64 wsSessionId, int ChannelId, char * UserId, char * UserName);
typedef bool __stdcall (*TGetWSSessionProperty)(__int64 wsSessionId, int &ChannelId, int &UserIdPtr, int &UserNamePtr);
typedef bool __stdcall (*TIsValidWSSession)(__int64 wsSessionId);
typedef bool __stdcall (*TGetWSSessionList)(int &CdsStreamPtr);
typedef bool __stdcall (*TSendToWSUser)(char * aUserId, char * aMsg, int DataFormat = 0x1);
typedef bool __stdcall (*TSendToBatchWSUser)(char * aUserIdList, char * aMsg, int DataFormat = 0x1);
typedef bool __stdcall (*TSendToWsChannel)(int Channel, char * aMsg, int DataFormat = 0x1);
typedef int __stdcall (*TAllocTmpDataId)(void);
typedef bool __stdcall (*TAssignConnParam)(char * aUserId, int ¶mPtr);
typedef void __stdcall (*TLogMsg)(char * aMsg);
typedef bool __stdcall (*TClosePoolConnections)(int PoolId);
typedef bool __stdcall (*TSendToAllConnections)(char * TargetNodeId, char * FromId, int MsgParcelPtr);
typedef bool __stdcall (*TSendToConnection)(char * TargetNodeId, __int64 ConnectionId, char * FromId, int MsgParcelPtr);
typedef bool __stdcall (*TSendToIntPropConnections)(char * TargetNodeId, int IntProp, char * FromId, int MsgParcelPtr);
typedef bool __stdcall (*TSendToStrPropConnections)(char * TargetNodeId, char * StrProp, char * FromId, int MsgParcelPtr);
typedef bool __stdcall (*TSendToRoleIdConnections)(char * TargetNodeId, char * RoleId, char * FromId, int MsgParcelPtr);
typedef bool __stdcall (*TQueryPluginProcAddr)(char * PluginId, char * ProcName, int &ProcAddr);
typedef bool __stdcall (*TQueryNodeAddress)(char * NodeId, int &AddressPtr, int &WebPort);
typedef bool __stdcall (*TBindingStrProp)(char * aSessionId, char * StrProp);
typedef bool __stdcall (*TBindingRoleId)(char * aSessionId, char * RoleId);
typedef bool __stdcall (*TBindingIntProp)(char * aSessionId, int IntProp);
typedef bool __stdcall (*TPostMsgToWebSession)(char * TargetSessionId, int MsgPtr);
typedef bool __stdcall (*TPostMsgToWebStrPropSessions)(char * TargetStrProp, int MsgPtr);
typedef bool __stdcall (*TPostMsgToWebRoleIdSessions)(char * TargetRoleId, int MsgPtr);
typedef bool __stdcall (*TPostMsgToWebIntPropSessions)(int TargetIntProp, int MsgPtr);
typedef bool __stdcall (*TPostMsgToAllWebSessions)(int MsgPtr);
typedef bool __stdcall (*TWebSessionMsgExists)(char * aSession, int &MsgCount, int &TotalSize);
typedef bool __stdcall (*TReadOneWebMessage)(char * aSession, int &MsgPtr);
typedef bool __stdcall (*TReadAllWebMessages)(char * aSession, int &MsgsPtr);
typedef void __stdcall (*TEnterPluginLock)(int LockIndex);
typedef void __stdcall (*TLeavePluginLock)(int LockIndex);
typedef bool __stdcall (*TGetDatabaseList)(int &CdsStreamPtr);
typedef bool __stdcall (*TIsValidDevice)(char * DeviceId);
typedef bool __stdcall (*TFetchUserList)(int &CdsStreamPtr);
typedef bool __stdcall (*TFetchNodeList)(bool InclideRootNode, int &CdsStreamPtr);
typedef void __stdcall (*TAddMD5CacheRecord)(char * aFileName, char * aMd5);
typedef int __stdcall (*TGetMd5FromCache)(char * aFileName);