全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:871
推到 Plurk!
推到 Facebook!

dll解構問題?

尚未結案
csm825050
一般會員


發表:49
回覆:29
積分:15
註冊:2003-08-20

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-08-10 10:03:45 IP:61.221.xxx.xxx 未訂閱
各位好: 我試寫一個dll的檔案,可是解構時會出現 Project Project1.exe raised exception class EInvalidPointer with message 'Invalid pointer operation'. 請問是出了什麼問題?    .h    #ifndef __ImageBase_h__ #define __ImageBase_h__ //--------------------------------------------------------------------------- #include  #include //--------------------------------------------------------------------------- #define IMAGEBASE_API __declspec(dllexport) /* #ifdef IMAGEBASE_EXPORTS #define IMAGEBASE_API __declspec(dllexport) #else #define IMAGEBASE_API __declspec(dllimport) #endif */ //--------------------------------------------------------------------------- IMAGEBASE_API class ImageBase { private: TMemoryStream *ImageStream; public: __stdcall ImageBase(); __stdcall ~ImageBase(); Graphics::TBitmap *Image; }; //--------------------------------------------------------------------------- #endif .cpp //--------------------------------------------------------------------------- #include #include "ImageBase.h" #include "TZLIB.h" //--------------------------------------------------------------------------- #pragma argsused BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved) { return 1; } //--------------------------------------------------------------------------- __stdcall ImageBase::ImageBase() { this->ImageStream=new TMemoryStream(); this->Image=new Graphics::TBitmap(); this->Flag=0; } //--------------------------------------------------------------------------- __stdcall ImageBase::~ImageBase() { // delete ImageStream; // delete Image; } //---------------------------------------------------------------------------
系統時間:2024-06-29 15:30:16
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!