Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

Creating ActiveX component for Pocket PC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rene.goris@aedificomm.com - 18 Jan 2008 14:32 GMT
We are trying to develop an ActiveX Control for the Pocket PC...

HTML code for installing and calling object:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <title>Test Cab</title>
    </head>
    <body>
        <a href="MyObjCab.cab">Install CAB file</a>
        <script language="jscript">
       try
       {
               var objParser = new ActiveXObject("MyObj.MyClass");
                alert (objParser.MyString);
       }
       catch (ex)
       {
               alert("Error message: " + ex.message + "\n\nError
number: " + ex.number);
       }
        </script>
    </body>
</html>

The C Source code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace MyObj
{
    [GuidAttribute("D959E687-11FF-4c49-88B6-C64FF7CF5E74")]
    [ComVisible(true)]

    public class MyClass
    {
        private string myString = "Hello World";

        public string MyString
        {
            get { return myString; }
            set { myString = value; }
        }

    }
}

The problem is that after installing (goes well, component visible in
configuration/add remove programs) we get an error:

Error message: Automation server can't create object
Error code: -2146827859

Please help!

Greetings,

Rene
Nicholas Paldino [.NET/C# MVP] - 18 Jan 2008 16:28 GMT
Rene,

   Well, .NET doesn't support creating ActiveX controls, so you should be
doing this in an unmanaged language, like VB6 or VC++.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> We are trying to develop an ActiveX Control for the Pocket PC...
>
[quoted text clipped - 58 lines]
>
> Rene

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.