CreateOleObject

System.Win.ComObj.hpp
#include <objbase.h>
 
 
Winapi.ActiveX.pas
 
CoInitialize(NULL);
 

Variant vapp;
vapp = Unassigned;

GUID guid = Comobj::StringToGUID("{F6295C21-BA09-418A-A98B-BAA87B50983E}");
vapp = (IUnknown*) CreateComObject(guid);
vapp.OleFunction("fun1",p1,p2);
v = Unassigned;

CoUninitialize

CreateOleObject

Variant obj = CreateOleObject("mycom.myView");
obj = Unassigned;

CoCreateInstance

http://blog.csdn.net/winglet/article/details/2872342

随机推荐

  1. LeetCode OJ:Divide Two Integers(两数相除)

    Divide two integers without using multiplication, division and mod operator. If it is overflow, retu ...

  2. LeetCode OJ:Set Matrix Zeroes(设置矩阵0元素)

    Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 这题要注意的 ...

  3. LeetCode OJ:First Bad Version(首个坏版本)

    You are a product manager and currently leading a team to develop a new product. Unfortunately, the ...

  4. 20165210 Java第四次实验报告

    20165210 实验四 Android程序设计 实验步骤 第24章:初识Android 任务一:完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号 学 ...

  5. oracle 存储过程心得2

    1.退出存储过程 return if old_save_time = new_save_time then--没有最新数据,退出 insert into hy_data_handle_mark(id, ...

  6. ng 实现插入和删除

    结果: 代码: <!DOCTYPE html> <html ng-app="myApp"> <head lang="en"> ...

  7. Unity3D开发之Matrix4x4矩阵变换

    在Unity开发中时常会用到Matrix4x4矩阵来变换场景中对象的位置.旋转和缩放.但是很多人都不太理解这儿Matrix4x4变换矩阵.通过DX中的变换矩阵我来讲一讲在unity中这个变换矩阵是怎么 ...

  8. android 字符串string

    String : 字符串类型 http://www.open-open.com/lib/view/open1387942832078.html 一.构造函数     String(byte[ ] by ...

  9. C++中继承关系中的同名隐藏和对策

    在C++及其面向对象的理论中,有这样的场景:一个类继承自另外一个类,如果这两个类都有一个函数名和参数及其返回值一样的成员函数,那么子类的函数会自动将父类对应的函数隐藏.即同名隐藏.在有时的开发过程中, ...

  10. spring Bean配置的三种形式

    Spring Bean配置有以下三种形式: 传统的xml配置 Spring 2.5 以后新增注解配置 Spring3.0以后新增JavaConfig 1. 传统的xml配置 <?xml vers ...