导航:  COM (Component Object Model) > COM Procedures >

AfxNewCom (overload)

上一页返回章节概述下一页

Description

 

Creates a single uninitialized object of the class associated with a specified CLSID.

 

FreeBASIC syntax

 

FUNCTION AfxNewCom OVERLOAD (BYREF classID AS CONST CLSID) AS ANY PTR

 

Parameters

 

classID

[in] The CLSID (class identifier) associated with the data and code that will be used to create the object.

 

Return value

 

The interface pointer or NULL.

 

Usage example

 

DIM pDic AS IDictionary PTR

pDic = AfxNewCom(CLSID_Dictionary)

 

where CLSID_Dictionary has been declared as

DIM CLSID_Dictionary AS CLSID = (&hEE09B103, &h97E0, &h11CF, {&h97, &h8F, &h00, &hA0, &h24, &h63, &hE0, &h6F})

 

Include file

 

AfxCOM.inc