Results 1 to 3 of 3

Thread: Using dlls with compact framework - Error 80040154

  1. #1

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Using dlls with compact framework - Error 80040154

    Hi,
    I seem to be asking a lot of questions lately but I have only fairly recently started using .net and now have a Windows CE application to develop.

    So, I am using VB on VS2005 to develop the Windows CE application and I want to re-use some VB6 dlls that I have been using for years.

    The dll is called DEF100 and in a standard windows application I would include it as a project reference and then use it as follows.
    VB Code:
    1. Dim objDefinitionFile As Object
    2.        
    3.         objDefinitionFile = CreateObject("DEF100.Definitions")
    4.         clsSpecParameter.shoMaximum = objDefinitionFile.iMaximum

    The above works just fine. My problem comes when I am now trying to use the same dll in the compact framework.
    It appears that the CreateObject method does not exist.
    I have tried to use
    VB Code:
    1. Dim objDefinitionFile As New DEF100.Definitions
    but get a "COM object cannot be created ..... error 0x80040154"

    Any help appreciated.
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Using dlls with compact framework - Error 80040154

    Hi,
    you can't use VB6 dlls on the compact framework, as it is a different architecture - compiled for x86, not ARM

    Pete

  3. #3

    Thread Starter
    Addicted Member A.P.Gumby's Avatar
    Join Date
    Oct 2005
    Location
    Outside the assylum
    Posts
    147

    Re: Using dlls with compact framework - Error 80040154

    Thanks for the reply,
    I can't believe I was that stupid.
    Of course, I am going to have to build my dlls as CE applicatons before I can use them.
    That must be a pain for anybody who has legacy dlls that they want to use in their application but do not have the source code.
    In that case, I guess that the answer would be to use XP embedded.

    I really appreciate the help you have been giving me here Pete.
    This forum seems a little quiet compared to other areas on VBForums.
    Is that usual?
    Using Visual Studio 2008.
    I am not young enough to know everything - Oscar Wilde

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