COM for eMbedded Visual C++ 3.0 ( Under Windows CE )

Environment: eMbedded Visual C++ 3.0, Windows 2000, Windows CE Emulator (Handheld PC Pro)

To Run this application we must have installed eMbedded Visual C++ 3.0

The Generation of the COM Server and the COM Client in embedded Visual C++ 3.0 is somewhat different than the Microsoft Visual C++ 6.0. It leads an error in the COM server while running the client. This Article resolves the error and achieves the Server functionality.

Generate the Server( CEServer.dll)

Generate the work space for the Server.

Step: 1

Step: 2

click finish.

Step 3:

Select Simple Object for the COM. Because we need simple COM object that supports in-proc server.

Click Next to select the interface name

Type Process in the field for short name. It automatically generates the Class name, Interface name etc as it was in Visual C++ 6.0.

Press OK. Now we have given the parameters how the COM object should be.

Build the Server dll. It builds successfully and does not give any error. We have generated the COM Server.

Generate the Client( CEClinet.exe)

Step 1:

Let the Client be a dialog based application,

The Design of the dialog is as shown in the figure.

Step 2:

Add the Server dll file path in stdafx.h file after #endif

#import "C:\\Program Files\\Windows CE Tools\\wce211\\MS HPC Pro
\\emulation\\hpcpro\\windows\\CEServer.dll" no_namespace

Note: In my system, the Windows CE Tools directory is in the Program Files. Try to modify according to your path.

Step 3:

Declare the pointer for the Process interface in the header file CEClientDlg.h,

CLSID clsid;
IProcess *m_pProcess;

Add the following lines in the OnInitDialog in CEClientDlg.cpp,

BOOL CCEClientDlg::OnInitDialog()
{
  CDialog::OnInitDialog();
  // TODO: Add extra initialization here
  HRESULT hr;
  hr = CLSIDFromProgID(OLESTR("CEServer.Process.1"),&clsid);
  if(FAILED(hr))
    MessageBox(NULL,_T("Prog id failed"), MB_OK);
  CoCreateInstance(clsid,
                   NULL,
                   CLSCTX_INPROC_SERVER,
                   __uuidof(IProcess),
                   (void**)&m_pProcess);

  if(m_pProcess == NULL)
    MessageBox(NULL,_T("interface pointer failed"), MB_OK);
  return TRUE; // return TRUE  unless you set the
               // focus to a control
}

Step 4:

Then call the function from the interface while the user clicks the button,
void CCEClientDlg::OnCallServer() 
{
  m_pProcess->Show();
}

Compile the Client Project. You will get some error in the server in the CEServer.tli file.

That is,  error C2065: '_com_issue_errorex' : 
  undeclared identifier.

This is the main difference while creating the COM in eMbedded Visual C++ 3.0. This error does not come in Microsoft Visual C++ 6.0. This article is mainly dedicated to solve this error and run the COM Client Successfully.

What to be done to resolve this problem
(The modification is in the CEServer.dll)

Add the definition or override the existing function.

Step 1:

Goto CEServer.idl file,

interface IProcess : IDispatch
{
   //Show function 
   //Add this function declaration here
   [id(2), helpstring("method _com_issue_errorex")] HRESULT
            _com_issue_errorex(HRESULT _hr1,
                               IUnknown  *pthis1,
                               const GUID  refiid1);
};

Step 2:

Goto Process.h file,

Add the declaration ,

STDMETHOD(_com_issue_errorex)(HRESULT _hr1,
            IUnknown  *pthis1,
            const GUID  refiid1);

Step 3:

Goto Process.cpp file,

Add the definition,

STDMETHODIMP CProcess::_com_issue_errorex(HRESULT _hr1,
            IUnknown  *pthis1,
            const GUID  refiid1)
{
  AFX_MANAGE_STATE(AfxGetStaticModuleState())

  // TODO: Add your implementation code here

  return S_OK;
}

Rebuild all.

Again come to the COM Client and rebuild the client application.

Downloads

Download demo project (COM CE Server) - 30 Kb
Download demo project (COM CE Client) - 40 Kb


Comments

  • Pelo GHD perfecto sin dañar el cabello

    Posted by qytlrn950 on 07/17/2013 05:30pm

    ghd sitios de venta en línea, disfrutar del pelo GHD barato para lograr los mejores resultados, ofrecemos el envío libre en Dinamarca, luchando para encontrar ghd le da la magia ahora, como planchas ghd populares, la ghd unos accesorios para el cabello perfectamente liso no sólo le da la oportunidad de? utilizando la vasta, sino también para ahorrar tid.Vi están preocupados por sus estrellas favoritas, no sólo una mayor comprensión de lo que dicen, van a degustar más preocupado por el vestido, retro-moda hoy en día sigue siendo cero loco, pelo rizado señora de pelo lacio tan popular diseño y más pelo volumen no es difícil ver lo que usted elija plancha ghd y tiene las habilidades, por lo que ha dado hoy una plancha de pelo pind.ghd diseño más elegante, el uso del campo hoy en día los aparatos negros más populares, una chica enamorada de uno de los varios colores, el mango es de color negro brillante, el color variado, a mano diseñado, antideslizante fácil de entender, difícil deslizar, mejor agarre, diseño del interruptor en el parte frontal del mango, fácil de operar. [url=http://compraresghd.webspawner.com/]planchas ghd[/url] plancha de pelo ghd utiliza placas de cerámica para liso, fácil de moldear. Control de la tensión, puede crear el más apropiado entre las placas cerámicas de pelo liso. El producto también tiene el mismo anión, la conservación de hacer que el cabello suave y brillante, para evitar el pánico. Cuerpo con una configuración de calor digitales, pantalla digital hace que sea fácil seleccionar la función deseada o ajustar la forma de la temperatura. Puede ayudar a elegir el pelo bien y la temperatura deseada. Pulse un botón, tendrá un efecto perfecto de inmediato. 1 función de apagado automático hora le permite utilizar más paz de la mente. Planchas ghd como operación segura y simple. Ocupar gran cuota de mercado. Convertido en una moda de comprar. Debido a esto, a menudo parece falsa, por lo que cada vez más personas están comprando auténticos planchas ghd. Nuestra tienda, aunque las ventas de negro pelo ghd. Pero somos productos ghd regulares. No traen todo tipo de daño fuego falso. Nuestro producto de mapa con el mapa físico es exactamente el mismo. Para asegurar que los productos reales y fiables. Y vendemos planchas ghd baratas, 7 * 24 funciones en línea, usted puede comprar en cualquier momento. Siempre y cuando haya seleccionado el tipo deseado, complete la información personal, etc temas relacionados, el producto puede ser enviado directamente a las manos de espera. Por favor, comprar productos ghd sentimientos antes, mira a nuestra política de privacidad, Quiénes somos, transporte, preguntas más frecuentes y las políticas más relevantes, esto le ayudará a comprar nuestros productos. Gracias por tu colaboración. [url=http://planchaspeloghd.cabanova.com/]planchas ghd baratas[/url] Los stylers ghd iv hechos de styler está diseñado para ser lo más cómodo posible. La plancha ghd IV Mini es la versión más pequeña de GHD, que son populares entre las personas con el pelo corto. Cierre automático La nueva generación de ghd IV styler ha sido equipado con una característica integral de seguridad para evitar que se salga accidentalmente el cabello a la vez unattended.Do usted quiere tener un set? Si lo hace, usted no debe dudar más, Tomar ghd hjem.Den GHD Glam Palm es la versión más pequeña de ghd, que es popular entre la gente con el pelo corto. Venta caliente GHD nu.Hvis usted todavía se pregunta dónde comprar ghd iv styler, y puedo decirle que usted puede tratar de comprar ghd iv styler en la tienda online, planchas ghd que son de alta calidad y el precio razonable.

    Reply
  • Qui ghd n'endommagera pas vos cheveux en été

    Posted by uffxrs916 on 07/16/2013 04:02pm

    Quand on sait ghd Norvège peut créer une variété de cheveux de style. Donc, nous voulons tous avoir un tel outil. Pour nous permettre easilycreate boucles et les vagues, ainsi que les cheveux raides parfait. Mais vous savez ce lisseur ghd sont le meilleur choix pour vous. Nous devons choisir lisseur ghd approprié pour vous, plutôt que de suivre le chemin de quelqu'un d'autre de l'acheter. [url=http://bbeatsinorge.cabanova.com/]ghd lisseur[/url] La chaleur est plus facile Gjennom peu cheveux épais enn. Par conséquent, le Satin Hair 7 Colour tige droite un réglage de chaleur intuitive qui laisse deg avancer sinn calme température banquets précise le type de cheveux (peu, les cheveux épais normal). Et même si vous Bruker bouton d'alimentation une jolie G. uregjerlige tresses, alors vous ne serez pas utsette ditt de cheveux à des températures supérieures à 200 ° C. Obtenez d'excellents résultats de coiffage danger uten des températures Hoye et nouvelle la belle hårfargen votre IMOT lenger.Tvert: ils empêchent fuktighetstap de style en y infligent ditt de cheveux satengioner unique! Ces ladde négatif ionène célébrations segment à la chevelure ladde positif ditt et reduserer sec, krusete cheveux et tiltrekker fuktighetspartikler de Lufta et leur envoyer votre le Trenger de cheveux le plus. [url=http://ghdpascherfer.hpage.com/]ghd pas cher lisseur[/url] Défrisants GHD pour Perfect Hair La meilleure façon d'avoir de redresseur de cheveux raides. Mais il est important de le faire correctement, sinon il ne suffit pas jour. Par exemple, vous pouvez séparer les cheveux avec des clips de sorte que vous obtenez avec tous les cheveux quand vous redresser. Il est également très important de se rappeler que défriser vos cheveux vraiment du mal cheveux instantanément lisse et brillant de la première børstetak, n'importe quand et n'importe où - vous suffit d'appuyer sur le bouton. Braun Satin Hair 7 brosse est facile à utiliser, peut être pris n'importe où, et réduit les frisottis et statique. Vous pouvez immédiatement voir et sentir la différence pour vos cheveux seront plus brillants et se sent beaucoup plus lisse.

    Reply
  • Monster Beats, en hyllest til den helt med den nye stilen og materialet av

    Posted by mantouhmmm on 06/04/2013 10:00am

    [url=http://www.beatsbydrestudio.moonfruit.com/]beats by dre studio[/url] Hvorfor begrense trenger disse forfalskninger ikke vises Beats nærheten av Dr. Dre spesifikasjoner handel lyd, trekk allot. tilgjengelig samle ett enkelt, stilig lilla fargetone, ønsket inspirert nær Justin Biebers farge. Velkommen fro å bli artist sleazy monster nå slår nær dre solo lilla Jovial Beats Solo HD-hodetelefoner, slår regionale utgave hodetelefoner, sleazy beats beholder du synes hele artist akseptable hugeness Beats By Dr. Dre Solo HD-hodetelefoner handel markedet Hodetelefoner handel lilje o.beats tur hodetelefoner f dalen lilla grå samlet, bare en i stedet atmosfærisk. Vi akt 100 pålitelig akseptabelt hugeness Beats nær Dre Solo HD mørk allot gul hodetelefoner garanti. rask ingen verdi Levering samle 7 days35 off, Billige Beats nærheten av Dr. Dre Solo HD whitened Onear hodetelefoner for ControlTalk bli hugeness Beats By Dre Studio Purple Limited trolTalk. [url=http://www.beatsbydrestudio.moonfruit.com/]beats by dre studio[/url] dette er lett å finne fra ulike nettsteder som har blitt prøvd og testet over tid. De trommerytmer er en viktig og en svært viktig del av beats samling uansett hva slags valdet du skriver skal de rap beats eller Jazz slår trommer er veldig viktig siden de gir en god følelse til composition.Visit ulike nettsteder og prøve litt av beats som er der og lytte til dem og prøve hva som tilbys. Besøke nettsteder som tilhører de ulike musikkproduksjon skoler for noen tips som hjelper deg i å kombinere din gratis rap beats og andre musikksjanger beats. Å kunne laste ned beats på nettet en av hemmelighetene er å slå sammen flere e-postlister som slår nedlasting nettsteder de vil gi deg siste nytt om downloads. [url=http://www.beatsstudionorge.weebly.com/]beats studio[/url] dette er lett å finne fra ulike nettsteder som har blitt prøvd og testet over tid. De trommerytmer er en viktig og en svært viktig del av beats samling uansett hva slags valdet du skriver skal de rap beats eller Jazz slår trommer er veldig viktig siden de gir en god følelse til composition.Visit ulike nettsteder og prøve litt av beats som er der og lytte til dem og prøve hva som tilbys. Besøke nettsteder som tilhører de ulike musikkproduksjon skoler for noen tips som hjelper deg i å kombinere din gratis rap beats og andre musikksjanger beats. Å kunne laste ned beats på nettet en av hemmelighetene er å slå sammen flere e-postlister som slår nedlasting nettsteder de vil gi deg siste nytt om downloads.

    Reply
  • Beats by dre primært Er synes er meget godt rimelige

    Posted by wanzixiao on 06/04/2013 07:54am

    [url=http://www.beatsbydrehretelefoner.weebly.com/]beats by dre høretelefoner[/url] IOC og LOCOG ikke havde reageret på en anmodning om at kommentere på tidspunktet for offentliggørelsen. Den officielle sponsor, der er mest tilbøjelige til at føle sig mest forurettede ved stunt er Panasonic.England fodboldspillere brugte Dr. Dre hovedtelefoner ved Euro 2012 for at undgå pressen. Hovedtelefonerne voksede i popularitet på Beijing 2008 Olympiske Lege, efter at selskabet gav dem til basketball stjerne LeBron James, og han gav dem ud til medlemmer af Team USA.Den baghold markedsføring initiativet kommer i hælene på en protest – iværksat af amerikanske sportsfolk, herunder 400m løber Sanya Richards-Ross – kritisere regel 40 i IOC adfærdskodeks. Reglen forbyder atleter fra at nævne deres personlige sponsorer på sociale medier under legene. [url=http://www.beatsbydrdredanmark.moonfruit.com/]beats by dre tilbud[/url] At Pressekonference afholdt med bestyrelsesmedlemmer i selskabet og pressen medlemmer, erklærede direktøren for selskabet, at statistikken over salget efter indførelsen af den nye beats har krydset benchmarks. Den digitale tidsalder med indførelsen af de nye teknologier også nødt til at opretholde de komplementære produkter som pr de nyeste standarder. Dette er, hvad kræver en opgradering i teknologien. Denne opgradering i teknologi er tilgængelig på helt minimerede satser på i form af de nyeste hovedtelefoner og headsets. Monster beats og andre mærker har hjulpet skabe sig en kunstnerisk niche. [url=http://www.beatsbydrdredanmark.webgarden.com/]beats by dre tilbud[/url] Dr. Dre er lykkedes gatecrashing London 2012 Olympics med et baghold marketing kampagne, der har set britiske sportsfolk, herunder Laura Robson og Tom Daley godkende rapper og musik iværksætterens Beats hovedtelefoner rækkevidde.Mærket, der ikke er officiel sponsor af Den Internationale Olympiske Komité eller London 2012, har skørt strenge regler for baghold markedsføring ved at sende britiske teammedlemmer særlige versioner af Beats spænder brandet med union flag farver.Tennisspiller Laura Robson tweeted om at modtage hendes hovedtelefoner, selvom stillingen nu synes at være blevet fjernet fra sin Twitter-konto , som gjorde fodbold målmand Jack Butland, som tweeted : “. Love My GB Beats by Dre”

    Reply
  • Fashion Party, billige ghd glattejern giver dig en unik frisure

    Posted by cheneason on 05/30/2013 04:40pm

    [url=http://www.cascos-beats-baratos.webs.com/]Cascos beats baratos[/url] 2011 ghd glattejern nye klassiske logo, og endda ændre den farve, spille nyt materiale, udover, at skabe en god ghd glat hår farver og udsøgt design af de små detaljer i den fantastiske sans for stil, GHD glattejern aftale som en smuk design, kombineret med en unik sans for stil, kombineret med elegant, effektiv brug af ressourcerne kan genanvendes. Begrebet miljøbeskyttelse tilføjes i. Tilføjer en masse folk som ghd glat hår. [url=http://www.auriculares-beats.webstarts.com/]Auriculares beats[/url] ghd fladjern anvender keramiske plader til glat, let at forme. Spændinger kontrol, kan du oprette den helt lige mellem de keramiske plader af glat hår. Produktet har også den samme anion, bevaring gør håret smidigt og blankt, for at undgå panik. Kroppen med en digital varmeindstillinger, digital display gør det nemt at vælge den ønskede funktion eller justere formen af ??temperaturen. Det kan hjælpe dig med at vælge det rigtige hår og den ønskede temperatur. Tryk på en knap, det samme har en perfekt form effekt. 1 time auto-sluk-funktionen giver dig mulighed for at bruge mere ro i sindet. Ghd glattejern så sikker og enkel betjening. Besætte stor markedsandel. [url=http://www.beats-by-dr-dre5.webnode.es/]Beats by dr dre[/url] Korrekte vokser for deres stedet de entydige særlige generere spørgsmål dette visse dem generelle velbefindende inde i dit individuelle hår, som vil skabe næsten vigtigste område. Den visse din egen fælles wellness i din private låse betydeligt afhænger af dine unikke beløb med hinanden med komponent for alle, der tænker om spise planen plan interiør denne bestemte.

    Reply
  • Isabel Marant Sneakers

    Posted by CrengarnexSap on 03/28/2013 02:02pm

    Hong Kong Celebrities in [url=http://austinandrew.co.uk/General/isabelmarant.aspx]Isabel Marant Sneaker Wedges sale[/url] Spotted – Kelly Chen, Florinda Ho and Hillary Tsui looking knowledgeable in Isabel Marant pieces from the Spring/Summer 2012 collection. We also spotted Joey Yung at the levee IT threw in the service of Isabel while she was in borough at Zuma mould week. Isabel Marant Opens Third Hong Kong Aggregate on Ice House Thoroughfare, Coming to Burgh on May 19 Read on how YOU can take first prize in a chance to upon Isabel in Hong Kong! The modish, and third in Hong Kong, Isabel Marant store on Ice Dwelling-place High road in Pre-eminent covers an neighbourhood of 570sq.ft. with the décor being a collaboration between Isabel Marant and the French construction partnership ciguë. To at the principal chance of the recent Ice Building Passage store, the set from France has expressly designed a brace of Asian little edition risqu‚ tie-dye sneakers, merely handy at Isabel Marant Paris, Hong Kong and Beijing. Go steady with our gallery of the remodelled stow away in this world and how you can connect us at an exclusive cocktail welcome on Isabel at Zuma on May 19. And we’re same impassioned to forth a spot for the benefit of a particular of our Butterboom readers and their old china to couple us for a cocktail party with Isabel Marant at Zuma on Saturday May 19 in the evening. You’ll be talented to come across her and take photos with her and learn more forth her plans here in Hong Kong. All you have to do is answer this subject in the comments inferior: “What year did Isabel Marant sling her [url=http://future-select.co.uk/General/isabelsneaker.aspx]where can i find isabel marant sneakers[/url]? Any true hound should recognize this and we’ll randomly pick complete victor with the censure conform to at noontide on Thursday, May 17th and email them directly. Western girl's authentic and fresh and insubordination: Isabel Marant 2012 qiu dong If it weren't an eye to Isabel Marant on the purpose of the 2012 qiu dong is based color with darker tones, at first glance, leak b feign a person believe this is designed for be born and summer cool: the embroidered neckline like greek tablecloth, off-white bud silk, silk skirt flare skirt is placed, and nine minutes of pants is decorated with a gold interweave tricky and soft. But gradually, the unscathed series will appear more elements of qiu dong: the conjunction of swart and pessimistic blue, rivet elements, cortex and oversize plea jacket... Isabel Marant plot with a view this period, with ageless country female in the western Coordinated States as the thesis, the clean and fresh and rebellious, r and provocative so along with the gender nature. Along with the gender colour with obstinate stormy and striking, disposed to be more in the streets is wearing Isabel Marant mark consistent characteristics. Conference models this season makeup is sent along with the gender nature. Each select of get-up, at any conditions be adept to wear them in the density in the street, and the split between also can match other style stretch is tasted. Designer Isabel Marant curtain christen at the purpose, it illustrates the tees: the latest embroidery phnom penh another avenue recreational style of pants collocation, rather peculiar T dream of, also along with the gender you sooner a be wearing it.

    Reply
  • How to solve OCX inclusion problem in WinCE Emulator

    Posted by Legacy on 06/06/2003 12:00am

    Originally posted by: Gowrisankar

    Hi,
    
    I am using eMbedded VC++4.0.
    I have written an application which uses an OCX file.
    I added the OCX component into the application and
    it built successfully.

    But when I start debugging the application,
    when I create the OCX component at run-time,
    I am getting the following error message.

    "CoCreateInstance of the OLE Control {GUID} failed.
    >>> Result Code: 0x80040154
    >>> Is the control is properly registered?"

    I have registered the OCX control properly and verified the registry entries.
    But still then I am not able to create the OCX component when I try to execute the application
    in CE Emulator which is provided with EVC 4.0.

    I have tested my application in an other platform of our own CE platform.
    But under CE Emulator it is functioning well.

    And I just want to know onething, Is OCX controls work under Emulator?

    please suggest any solution for this problem.

    Reply
  • with Events?

    Posted by Legacy on 01/09/2003 12:00am

    Originally posted by: Ellis LI

    I can't create a ATl object with events. Can help?

    Reply
  • How to make COM server run in Emulator?

    Posted by Legacy on 05/08/2002 12:00am

    Originally posted by: HuuQuynh


    Dir B. Manivannan,

    I am a beginner. So I do not know how to make a DLL, as COM server, run in Emulator! I think I must modify some Registry keys. But I do not know how. I have a example in shell programming, writing a IME for Palm size PC or Pocket PC, compiled by EVC 3.0, compiled complete, download complete, and EVC registered DLL completed too! But how to make DLL (IME) run in emulator?

    Thank you very much!

    Best regards,
    HuuQuynh

    Reply
  • How to register the COM dll on PPC?

    Posted by Legacy on 04/12/2002 12:00am

    Originally posted by: BJ Lee

    On desktop and HPC, we just use regsvr32.exe for registering COM dlls.
    But we don't have that on PPC, how to register ?

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • Due to internal controls and regulations, the amount of long term archival data is increasing every year. Since magnetic tape does not need to be periodically operated or connected to a power source, there will be no data loss because of performance degradation due to the drive actuator. Read this white paper to learn about a series of tests that determined magnetic tape is a reliable long-term storage solution for up to 30 years.

Most Popular Programming Stories

More for Developers

RSS Feeds