Alaska Software Inc. - :queryInterface()
Username: Password:
AuthorTopic: :queryInterface()
AUGE_OHR:queryInterface()
on Tue, 14 Apr 2009 21:33:31 +0200
hi,

same Sample c:\Alaska\XPPW32\source\SYS\activex.prg
more Question:

CLASS METHOD ImageList:Create(...)
   oReturn := AutomationObject():Create( cCLSID,, cLicense )
   IF ValType(oReturn) == "O"
      oReturn := oReturn:QueryInterface( cGUID )

as i understand i can "add" another AutomationObject and
get its Method and Property with :QueryInterface( cGUID ) ?

while ImageList want to use ListImages "property" i have to
use CLSID of "IImages".

now it try same with Codejock Controls TabControl

TabControl want to use InsertItem "Method"(?) so i try to
use CLSID of "ITabControlItem" but i got NIL

Question : is cGUID == CLSID ?
... and how to pass a :Licence with :QueryInterface( cGUID ) ?

greetings by OHR
Jimmy





GUID.JPG
AUGE_OHRRe: :queryInterface()
on Wed, 15 Apr 2009 17:37:14 +0200
hi,

>so i try to use CLSID of "ITabControlItem" but i got NIL
>
> Question : is cGUID == CLSID ?
> ... and how to pass a :Licence with :QueryInterface( cGUID ) ?

*** code ***
CLASS METHOD HX2_TabCtrl:Create( oOwner )
LOCAL oReturn := AutomationObject():Create( CJTABCTRL_PROGID,;
                                                            ,;
                                            CJTABCTRL_LICENSE )
   IF ValType(oReturn) == "O"
      oReturn         := oReturn:QueryInterface( CJTAB_UUID )
      oReturn         := oReturn:DynamicCast( HX2_TabCtrl() )
*     oReturn         := oReturn:DynamicCast( HX2_TabPage() )
      oReturn:Owner   := oOwner
      oReturn:CLSID   := CJTABCTRL_PROGID
*     oReturn:Licence ???
      oReturn:UseMarshalling := .F.

      ::lfirst := .F.
      ::nIndex := 0
   ENDIF
RETURN oReturn
*** eof ***
give me
*** qoute ***
#define CJTABCTRL_PROGID       "Codejock.TabControl"+HX_VERSION()
#define CJTABCTRL_LICENSE      "Suite Controls Copyright (c) 2003-2009
                               "PRODUCT-ID: 
Codejock.Controls.ActiveX.v13.0"+CRLF;
                               "VALIDATE-CODE: NSR-VTA-EXQ-TPT"
 TabControlpage
#define CJTAB_UUID             "{6D1AC8C5-4AC6-42EA-9345-D387A5644C07}"


oError:args         :
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: O CLASS: HX2_TabCtrl
oError:canDefault   : N
oError:canRetry     : N
oError:canSubstitute: J
oError:cargo        : NIL
oError:description  : Empfnger der Nachrichten ist kein Objekt
oError:filename     :
oError:genCode      :         38
oError:operation    : DynamicCast
oError:osCode       :          0
oError:severity     :          2
oError:subCode      :       2266
oError:subSystem    : BASE
oError:thread       :          1
oError:tries        :          0
*** eof ***

changing activeX TabControl to TabControlPage

*** quote ***
#define CJTABCTRL_PROGID       "Codejock.TabControlPage"+HX_VERSION()
#define CJTABCTRL_LICENSE      "Suite Controls Copyright (c) 2003-2009
                               "PRODUCT-ID: 
Codejock.Controls.ActiveX.v13.0"+CRLF;
                               "VALIDATE-CODE: NSR-VTA-EXQ-TPT"

#define CJTAB_UUID             "{DC2D53F8-9942-423D-BB35-28D1BBE3A240}"

oError:args         :
          -> VALTYPE: C VALUE: addTab
          -> VALTYPE: C VALUE:  &A
          -> VALTYPE: C VALUE: star32.ico
oError:canDefault   : J
oError:canRetry     : N
oError:canSubstitute: J
oError:cargo        : NIL
oError:description  : Keine Lizenz fr die Verwendung dieser Klasse
vorhanden

oError:filename     : NIL
oError:genCode      : NIL
oError:operation    : addTab
oError:osCode       :          -2147221230
oError:severity     :          2
oError:subCode      :       6500
oError:subSystem    : Automation
oError:thread       :          1
oError:tries        : NIL
*** eof ***

so ask again : how to pass a :Licence with :QueryInterface( cGUID ) ?

greetings by OHR
Jimmy