那位懂C++和dephi的朋友帮忙转下这个代码,把下面的C++代码转成DELPHI的
// IMyIEUnknow.h: interface for the IMyIEUnknow class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_)
#define AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ocidl.h"
#include "atlbase.h"extern const IID IID_MYIEClient;
extern const IID IID_MYIEServer;class __declspec(uuid("a893efb0-d4fe-4ade-9245-55d3af9684ea")) IMyIEClient;
class IMyIEServer;/*---------------------------defination for client interface-----------------------*///=============================================================================================
// Other interface that the plugin may also want to implement (Compatiable with IE)
// 1. IObjectWithSite : Any plugin that wants to interact with the browser window
// : inside myie2 shall implement this interface.
// Note: Unlike IE, the IObjectWithSite::SetSite will be called each time
// : a browser windows inside myie2 is activated.
//
// 2. IDeskBand : Any plugin that wants to have a window (mostly a toolbar) displayed
// : inside myie2 top panel, left panel or the bottom panel should
// : implement this interface. See MSDN for more help.
//
// 3. IInputObject : Any plugin that wants to handle user input should implement this
// : interface. See MSDN for more help.
// 4. IOleCommandTarget: Any plugin wants to add a button,or menu, to myie2 plugin bar shall implement
// interface, when the button,or menu is clicked, the IOleCommandTarget::Exec will
// be called.
//=============================================================================================//=============================================================================================
// Interface name : IMyIEClient
// Description : MyIE plugin should at least implement this interface
// : Note, it is derived from IUnknow, which means the server will
// : be able to query other interface through this one .
// :
//=============================================================================================class IMyIEClient:public IUnknown
{
protected:
// DWORD m_dwRef;
public:
// =============================================================================================
// Function name : Init
// Description : It is called when the plugin is loaded
// Return type : BOOL
// Argument : IMyIEServer* pServer : A interface pointer of MyIEServer, client can query any other interface through this one
// =============================================================================================
virtual BOOL Init(IMyIEServer* pServer) = 0; // =============================================================================================
// Function name : Exit
// Description : It is called when the plugin is unloaded
// Return type : BOOL
// Argument :
// =============================================================================================
virtual BOOL Exit() = 0; // called when the plugin is unloaded
// =============================================================================================
// Function name : Config
// Description : It is called when user want to config the plugin
// Return type : BOOL
// Argument : HWND hParent: It should be used as the parent window of client config window
// =============================================================================================
virtual BOOL Config(HWND hParent) = 0;};
/*------------------------------------defination for server interface---------------------*/
struct MyIEInfo
{
HWND hMainWnd;
HMENU hMainMenu;
};
class IMyIEServer:public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) = 0;
virtual ULONG STDMETHODCALLTYPE AddRef() = 0;
virtual ULONG STDMETHODCALLTYPE Release() = 0;
virtual MyIEInfo* STDMETHODCALLTYPE GetInfo()=0;
IMyIEServer(){};
virtual ~IMyIEServer(){};
};
#endif // !defined(AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_)
// IMyIEUnknow.h: interface for the IMyIEUnknow class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_)
#define AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ocidl.h"
#include "atlbase.h"extern const IID IID_MYIEClient;
extern const IID IID_MYIEServer;class __declspec(uuid("a893efb0-d4fe-4ade-9245-55d3af9684ea")) IMyIEClient;
class IMyIEServer;/*---------------------------defination for client interface-----------------------*///=============================================================================================
// Other interface that the plugin may also want to implement (Compatiable with IE)
// 1. IObjectWithSite : Any plugin that wants to interact with the browser window
// : inside myie2 shall implement this interface.
// Note: Unlike IE, the IObjectWithSite::SetSite will be called each time
// : a browser windows inside myie2 is activated.
//
// 2. IDeskBand : Any plugin that wants to have a window (mostly a toolbar) displayed
// : inside myie2 top panel, left panel or the bottom panel should
// : implement this interface. See MSDN for more help.
//
// 3. IInputObject : Any plugin that wants to handle user input should implement this
// : interface. See MSDN for more help.
// 4. IOleCommandTarget: Any plugin wants to add a button,or menu, to myie2 plugin bar shall implement
// interface, when the button,or menu is clicked, the IOleCommandTarget::Exec will
// be called.
//=============================================================================================//=============================================================================================
// Interface name : IMyIEClient
// Description : MyIE plugin should at least implement this interface
// : Note, it is derived from IUnknow, which means the server will
// : be able to query other interface through this one .
// :
//=============================================================================================class IMyIEClient:public IUnknown
{
protected:
// DWORD m_dwRef;
public:
// =============================================================================================
// Function name : Init
// Description : It is called when the plugin is loaded
// Return type : BOOL
// Argument : IMyIEServer* pServer : A interface pointer of MyIEServer, client can query any other interface through this one
// =============================================================================================
virtual BOOL Init(IMyIEServer* pServer) = 0; // =============================================================================================
// Function name : Exit
// Description : It is called when the plugin is unloaded
// Return type : BOOL
// Argument :
// =============================================================================================
virtual BOOL Exit() = 0; // called when the plugin is unloaded
// =============================================================================================
// Function name : Config
// Description : It is called when user want to config the plugin
// Return type : BOOL
// Argument : HWND hParent: It should be used as the parent window of client config window
// =============================================================================================
virtual BOOL Config(HWND hParent) = 0;};
/*------------------------------------defination for server interface---------------------*/
struct MyIEInfo
{
HWND hMainWnd;
HMENU hMainMenu;
};
class IMyIEServer:public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) = 0;
virtual ULONG STDMETHODCALLTYPE AddRef() = 0;
virtual ULONG STDMETHODCALLTYPE Release() = 0;
virtual MyIEInfo* STDMETHODCALLTYPE GetInfo()=0;
IMyIEServer(){};
virtual ~IMyIEServer(){};
};
#endif // !defined(AFX_IMYIEUNKNOW_H__BCBEA441_D89E_4D2E_B7B9_0ACD800CD3F1__INCLUDED_)
解决方案 »
- SQL参数传递怎么实现一个参数:dist_id传递('572','571')这样的值?
- 字符串函数问题,帮帮忙。
- Tpopupmenu 与 TEdit 的右键菜单冲突如何解决!!急
- Delphi7.0有没有简体中文版?不是汉化的那种。
- 南昌美商独资公司面向 南昌 招聘
- 在线等待!再问一下Delphi的时间问题.
- netwolfds(晓竹)请来拿分
- 如何打包dll
- 使用application.createform创建窗体怎么总是出错?
- EHLIB导入文本文件功能如何实现(LoadDBGridEhFromImportFile)?
- 求助Delphi高手!一个很简单的问题!!!
- execProgram,CopyAFile 這兩個function ,需包哪個單元文件
我精通c++和delphi,但你的分真的太少了.不好意思