Results 1 to 4 of 4

Thread: Silly question on casting

Threaded View

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Silly question on casting

    Hi All
    VB 6.0
    I am a c# developer usually but have had to create a vb 6 application to test a COM object.

    The problem I have is that I get the following error when I run the code below :

    Sub or Function not define

    Code:
       
     Dim objClass As New clsAPI
     Dim objInterface As IAPI
     objInterface = CType(objClass, IAPI)
    It can't find CType. I don't get it. Is Ctype in some surreal location?
    I suppose VB 6 can't do this at all.
    Last edited by venerable bede; Jul 16th, 2009 at 05:59 AM.

    Parksie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width