Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. convertion vc6 to dotnet2008

convertion vc6 to dotnet2008

Scheduled Pinned Locked Moved ATL / WTL / STL
c++csharphelpquestion
20 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rajeesh MP
    wrote on last edited by
    #1

    HI i need to convert a vc6 project to dotnet2008. i took ATL new project and i added my old vc++ files. i got some more errors..that everything i fixed...exept one..that is Error 1 error LNK2001: unresolved external symbol _CLSID_ABC ABC.obj AppFast Error 2 fatal error LNK1120: 1 unresolved externals .........ABC.dll 1 ABC the code is like this..in my header file

    EXTERN_C const CLSID CLSID_ABC;
    #ifdef __cplusplus
    class DECLSPEC_UUID("97676011-B0FA-40cf-AECC-7BD3FF54BE4E")
    ABC;
    #endif

    what is wrong...i dont know much about c++ i m working in c# and vb in dotnet2005 Please ,,,i m expecting helps Regards Raj

    S 1 Reply Last reply
    0
    • R Rajeesh MP

      HI i need to convert a vc6 project to dotnet2008. i took ATL new project and i added my old vc++ files. i got some more errors..that everything i fixed...exept one..that is Error 1 error LNK2001: unresolved external symbol _CLSID_ABC ABC.obj AppFast Error 2 fatal error LNK1120: 1 unresolved externals .........ABC.dll 1 ABC the code is like this..in my header file

      EXTERN_C const CLSID CLSID_ABC;
      #ifdef __cplusplus
      class DECLSPEC_UUID("97676011-B0FA-40cf-AECC-7BD3FF54BE4E")
      ABC;
      #endif

      what is wrong...i dont know much about c++ i m working in c# and vb in dotnet2005 Please ,,,i m expecting helps Regards Raj

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Rajeesh MP wrote:

      i need to convert a vc6 project to dotnet2008. i took ATL new project and i added my old vc++ files.

      You probably should just have opened the VC6 project in VS2008 - it would have converted it to the right format just fine.

      Rajeesh MP wrote:

      EXTERN_C const CLSID CLSID_ABC;

      I suspect that DECLSPEC_UUID doesn't mean quite the same as it used to or something. You need to add a definition of CLSID_ABC to a .cpp file somewhere.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      R 1 Reply Last reply
      0
      • S Stuart Dootson

        Rajeesh MP wrote:

        i need to convert a vc6 project to dotnet2008. i took ATL new project and i added my old vc++ files.

        You probably should just have opened the VC6 project in VS2008 - it would have converted it to the right format just fine.

        Rajeesh MP wrote:

        EXTERN_C const CLSID CLSID_ABC;

        I suspect that DECLSPEC_UUID doesn't mean quite the same as it used to or something. You need to add a definition of CLSID_ABC to a .cpp file somewhere.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        R Offline
        R Offline
        Rajeesh MP
        wrote on last edited by
        #3

        Dear Stuart Uuid is same only.. i have a doubt

        #ifndef __AppFastLib_LIBRARY_DEFINED__
        #define __AppFastLib_LIBRARY_DEFINED__

        /* library AppFastLib */
        /* [helpstring][version][uuid] */

        EXTERN_C const IID LIBID_AppFastLib;
        #endif /* __AppFastLib_LIBRARY_DEFINED__ */

        /* Additional Prototypes for ALL interfaces */

        this is generating at compiling time in ABC_i.h if i m manualy trying to add my code. That would be deleted...

        EXTERN_C const CLSID CLSID_ABC;
        #ifdef __cplusplus
        class DECLSPEC_UUID("97676011-B0FA-40cf-AECC-7BD3FF54BE4E")
        ABC;
        #endif

        how do i add this class instant in ABC_i.h Regards Rajeesh

        S R 2 Replies Last reply
        0
        • R Rajeesh MP

          Dear Stuart Uuid is same only.. i have a doubt

          #ifndef __AppFastLib_LIBRARY_DEFINED__
          #define __AppFastLib_LIBRARY_DEFINED__

          /* library AppFastLib */
          /* [helpstring][version][uuid] */

          EXTERN_C const IID LIBID_AppFastLib;
          #endif /* __AppFastLib_LIBRARY_DEFINED__ */

          /* Additional Prototypes for ALL interfaces */

          this is generating at compiling time in ABC_i.h if i m manualy trying to add my code. That would be deleted...

          EXTERN_C const CLSID CLSID_ABC;
          #ifdef __cplusplus
          class DECLSPEC_UUID("97676011-B0FA-40cf-AECC-7BD3FF54BE4E")
          ABC;
          #endif

          how do i add this class instant in ABC_i.h Regards Rajeesh

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          I've just had a look at an ATL project I've got. The CLSID for my class is defined in my equivalent of ABC_i.c - is that file (ABC_i.c) being compiled and linked in your project?

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          R 1 Reply Last reply
          0
          • S Stuart Dootson

            I've just had a look at an ATL project I've got. The CLSID for my class is defined in my equivalent of ABC_i.c - is that file (ABC_i.c) being compiled and linked in your project?

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            R Offline
            R Offline
            Rajeesh MP
            wrote on last edited by
            #5

            i dont know much more abt this vc++.. how do i link my class to this ABC_i.c i need to give any reference or any alternate methord..?? After compiling...ABC_i.c is generating...with out my CLSID of my class

            S 1 Reply Last reply
            0
            • R Rajeesh MP

              i dont know much more abt this vc++.. how do i link my class to this ABC_i.c i need to give any reference or any alternate methord..?? After compiling...ABC_i.c is generating...with out my CLSID of my class

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              Right-click on ABC_i.c in Solution Explorer and select Properties. Under Configuration Properties->General, the 'Excluded from Build' property should be set to 'No'. Now rebuild the project. At some point, in the output window, you should see mention of ABC_i.c - that means it is being compiled. Hopefully the project will automatically link with ABC_i.c - if it doesn't, I'm not sure why....

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              R 1 Reply Last reply
              0
              • S Stuart Dootson

                Right-click on ABC_i.c in Solution Explorer and select Properties. Under Configuration Properties->General, the 'Excluded from Build' property should be set to 'No'. Now rebuild the project. At some point, in the output window, you should see mention of ABC_i.c - that means it is being compiled. Hopefully the project will automatically link with ABC_i.c - if it doesn't, I'm not sure why....

                Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                R Offline
                R Offline
                Rajeesh MP
                wrote on last edited by
                #7

                there is no luck for me... //====================================================================================== /* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 7.00.0500 */ /* at Sat Apr 18 14:23:13 2009 */ /* Compiler settings for .\AppFast.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #endif #include "rpc.h" #include "rpcndr.h" #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of #endif // __RPCNDR_H_VERSION__ #ifndef __ABC_i_h__ #define __ABC_i_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" #ifdef __cplusplus extern "C"{ #endif #ifndef __ABCLib_LIBRARY_DEFINED__ #define __ABCLib_LIBRARY_DEFINED__ /* library ABCLib */ /* [helpstring][version][uuid] */ EXTERN_C const IID LIBID_ABCLib; #endif /* __ABCLib_LIBRARY_DEFINED__ */ /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif //====================================================================================== this is my generated ABC_i.c.... After this code EXTERN_C const IID LIBID_ABCLib; i need to add want to add this code...

                EXTERN_C const CLSID CLSID_ABCPP;

                #ifdef __cplusplus

                class DECLSPEC_UUID("D85DDEB0-0354-44A0-842C-D264885B8A92")
                ABCPP;
                #endif

                is it possible....Please ... Regards Rajeesh

                S 1 Reply Last reply
                0
                • R Rajeesh MP

                  there is no luck for me... //====================================================================================== /* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 7.00.0500 */ /* at Sat Apr 18 14:23:13 2009 */ /* Compiler settings for .\AppFast.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #endif #include "rpc.h" #include "rpcndr.h" #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of #endif // __RPCNDR_H_VERSION__ #ifndef __ABC_i_h__ #define __ABC_i_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" #ifdef __cplusplus extern "C"{ #endif #ifndef __ABCLib_LIBRARY_DEFINED__ #define __ABCLib_LIBRARY_DEFINED__ /* library ABCLib */ /* [helpstring][version][uuid] */ EXTERN_C const IID LIBID_ABCLib; #endif /* __ABCLib_LIBRARY_DEFINED__ */ /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif //====================================================================================== this is my generated ABC_i.c.... After this code EXTERN_C const IID LIBID_ABCLib; i need to add want to add this code...

                  EXTERN_C const CLSID CLSID_ABCPP;

                  #ifdef __cplusplus

                  class DECLSPEC_UUID("D85DDEB0-0354-44A0-842C-D264885B8A92")
                  ABCPP;
                  #endif

                  is it possible....Please ... Regards Rajeesh

                  S Offline
                  S Offline
                  Stuart Dootson
                  wrote on last edited by
                  #8

                  See, you've confused me now. First you have a linker error, which means that CLSID_ABC was declared in the header, but not defined anywhere. Now you're saying you need to add some code into the header...now, that's not going to help with your linker errors at all.

                  Rajeesh MP wrote:

                  this is my generated ABC_i.c....

                  Also - you didn't actually post your ABC_i.c file.

                  Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                  R 1 Reply Last reply
                  0
                  • S Stuart Dootson

                    See, you've confused me now. First you have a linker error, which means that CLSID_ABC was declared in the header, but not defined anywhere. Now you're saying you need to add some code into the header...now, that's not going to help with your linker errors at all.

                    Rajeesh MP wrote:

                    this is my generated ABC_i.c....

                    Also - you didn't actually post your ABC_i.c file.

                    Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                    R Offline
                    R Offline
                    Rajeesh MP
                    wrote on last edited by
                    #9

                    no dear... i will explain u very simply..... if i am adding a class to my ATL application...that class id will generate automatically in our ABC_i.h.... but i m trying to add my existing file to my application...After compiling time this existing CLASSID is not generating in our ABC_i.h so my question after adding this excisting ABC.cpp i need do something in our application settings..for generating this classid.. Regards Raj

                    S 1 Reply Last reply
                    0
                    • R Rajeesh MP

                      no dear... i will explain u very simply..... if i am adding a class to my ATL application...that class id will generate automatically in our ABC_i.h.... but i m trying to add my existing file to my application...After compiling time this existing CLASSID is not generating in our ABC_i.h so my question after adding this excisting ABC.cpp i need do something in our application settings..for generating this classid.. Regards Raj

                      S Offline
                      S Offline
                      Stuart Dootson
                      wrote on last edited by
                      #10

                      Rajeesh MP wrote:

                      if i am adding a class to my ATL application...that class id will generate automatically in our ABC_i.h....

                      Fine - we agree on that :-)

                      Rajeesh MP wrote:

                      but i m trying to add my existing file to my application...After compiling time this existing CLASSID is not generating in our ABC_i.h

                      By 'existing file', I presume you mean the IDL file that contains that class and interface definition? Or not?

                      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                      R 1 Reply Last reply
                      0
                      • S Stuart Dootson

                        Rajeesh MP wrote:

                        if i am adding a class to my ATL application...that class id will generate automatically in our ABC_i.h....

                        Fine - we agree on that :-)

                        Rajeesh MP wrote:

                        but i m trying to add my existing file to my application...After compiling time this existing CLASSID is not generating in our ABC_i.h

                        By 'existing file', I presume you mean the IDL file that contains that class and interface definition? Or not?

                        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                        R Offline
                        R Offline
                        Rajeesh MP
                        wrote on last edited by
                        #11

                        Good MOrning...Stuart NO...directly i m adding ABCD.cpp and ABCD.h file why..there is no other post...??only we are here...ha ha ha Mr.Staurt ..can u add me on ur personel mail... my id rajeeshmp@gmail.com Regards, Rajeesh MP

                        modified on Wednesday, April 22, 2009 12:16 AM

                        S 1 Reply Last reply
                        0
                        • R Rajeesh MP

                          Good MOrning...Stuart NO...directly i m adding ABCD.cpp and ABCD.h file why..there is no other post...??only we are here...ha ha ha Mr.Staurt ..can u add me on ur personel mail... my id rajeeshmp@gmail.com Regards, Rajeesh MP

                          modified on Wednesday, April 22, 2009 12:16 AM

                          S Offline
                          S Offline
                          Stuart Dootson
                          wrote on last edited by
                          #12

                          Rajeesh MP wrote:

                          NO...directly i m adding ABCD.cpp and ABCD.h file

                          OK - finally, I think I'm clear on why you're having these problems :-) So...let me tell you what I've done and let's see if that helps. I first created an ActiveX project called "ax-ctrl", with a simple ActiveX object called "test". That built fine. It contained files test.h and test.cpp (for the object) and axctrl_i.c and axctrl_i.h (for the ActiveX library). I then created another ActiveX project called "ax-copy" and added test.cpp and test.h to that without moving them from the existing project. When I built that project, it complained about missing symbols like this:

                          3>test.obj : error LNK2001: unresolved external symbol _IID_Itest
                          3>test.obj : error LNK2001: unresolved external symbol _LIBID_axctrlLib

                          I then added axctrl_i.c to the ax-copy project and (after telling it not to use precompiled headers) it worked fine.

                          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                          R 1 Reply Last reply
                          0
                          • S Stuart Dootson

                            Rajeesh MP wrote:

                            NO...directly i m adding ABCD.cpp and ABCD.h file

                            OK - finally, I think I'm clear on why you're having these problems :-) So...let me tell you what I've done and let's see if that helps. I first created an ActiveX project called "ax-ctrl", with a simple ActiveX object called "test". That built fine. It contained files test.h and test.cpp (for the object) and axctrl_i.c and axctrl_i.h (for the ActiveX library). I then created another ActiveX project called "ax-copy" and added test.cpp and test.h to that without moving them from the existing project. When I built that project, it complained about missing symbols like this:

                            3>test.obj : error LNK2001: unresolved external symbol _IID_Itest
                            3>test.obj : error LNK2001: unresolved external symbol _LIBID_axctrlLib

                            I then added axctrl_i.c to the ax-copy project and (after telling it not to use precompiled headers) it worked fine.

                            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                            R Offline
                            R Offline
                            Rajeesh MP
                            wrote on last edited by
                            #13

                            Ha Ha Ha... my application is working same way only... before posting this message...i done this..and its working fine... but i would like to know any alternate trik is there or not..like adding reference or linking....etc Thank u Stuart Rajeesh MP

                            R S 2 Replies Last reply
                            0
                            • R Rajeesh MP

                              Ha Ha Ha... my application is working same way only... before posting this message...i done this..and its working fine... but i would like to know any alternate trik is there or not..like adding reference or linking....etc Thank u Stuart Rajeesh MP

                              R Offline
                              R Offline
                              Rajeesh MP
                              wrote on last edited by
                              #14

                              Good Morning Mr.Stuart :) if i m creating a dll with ATl dotnet2008. that we can register in regscr 32 /i "dll path"...am i right..???:confused: my old c++ application like this (ABC.cpp)

                              CComModule _Module;

                              BEGIN_OBJECT_MAP(ObjectMap)
                              OBJECT_ENTRY(CLSID_ABCD, CABCD)
                              END_OBJECT_MAP()

                              /////////////////////////////////////////////////////////////////////////////
                              // DLL Entry Point

                              extern "C"
                              BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
                              {
                              if (dwReason == DLL_PROCESS_ATTACH)
                              {
                              _Module.Init(ObjectMap, hInstance, &LIBID_ABCLib);
                              DisableThreadLibraryCalls(hInstance);
                              }
                              else if (dwReason == DLL_PROCESS_DETACH)
                              _Module.Term();
                              return TRUE; // ok
                              }

                              but now i m converting this to new application with ATL dotnet2008. ;P so in my dllmain.cpp contains :-\

                              CABCModule _AtlModule;
                              //DLL Entry Point
                              extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
                              {
                              hInstance;
                              return _AtlModule.DllMain(dwReason, lpReserved);
                              }

                              and ABCD.h contains :doh:

                              OBJECT_ENTRY_AUTO(__uuidof(ABCD), CABCD)

                              My new ATL appliation is successfully succeeded.. regscr 32 /i "dll path" i can register like this..no error:rose: After registering my AIM is not getting..its not working.. :zzz: i m feeling this above code conversion is not proper.. so mr.Stuart please :laugh: check this code and let me know.. Thanks Rajeesh MP

                              S 1 Reply Last reply
                              0
                              • R Rajeesh MP

                                Ha Ha Ha... my application is working same way only... before posting this message...i done this..and its working fine... but i would like to know any alternate trik is there or not..like adding reference or linking....etc Thank u Stuart Rajeesh MP

                                S Offline
                                S Offline
                                Stuart Dootson
                                wrote on last edited by
                                #15

                                Rajeesh MP wrote:

                                but i would like to know any alternate trik is there or not..like adding reference or linking

                                Not really - building the UUID directly into the code is hte best way.

                                Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                                R 1 Reply Last reply
                                0
                                • R Rajeesh MP

                                  Good Morning Mr.Stuart :) if i m creating a dll with ATl dotnet2008. that we can register in regscr 32 /i "dll path"...am i right..???:confused: my old c++ application like this (ABC.cpp)

                                  CComModule _Module;

                                  BEGIN_OBJECT_MAP(ObjectMap)
                                  OBJECT_ENTRY(CLSID_ABCD, CABCD)
                                  END_OBJECT_MAP()

                                  /////////////////////////////////////////////////////////////////////////////
                                  // DLL Entry Point

                                  extern "C"
                                  BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
                                  {
                                  if (dwReason == DLL_PROCESS_ATTACH)
                                  {
                                  _Module.Init(ObjectMap, hInstance, &LIBID_ABCLib);
                                  DisableThreadLibraryCalls(hInstance);
                                  }
                                  else if (dwReason == DLL_PROCESS_DETACH)
                                  _Module.Term();
                                  return TRUE; // ok
                                  }

                                  but now i m converting this to new application with ATL dotnet2008. ;P so in my dllmain.cpp contains :-\

                                  CABCModule _AtlModule;
                                  //DLL Entry Point
                                  extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
                                  {
                                  hInstance;
                                  return _AtlModule.DllMain(dwReason, lpReserved);
                                  }

                                  and ABCD.h contains :doh:

                                  OBJECT_ENTRY_AUTO(__uuidof(ABCD), CABCD)

                                  My new ATL appliation is successfully succeeded.. regscr 32 /i "dll path" i can register like this..no error:rose: After registering my AIM is not getting..its not working.. :zzz: i m feeling this above code conversion is not proper.. so mr.Stuart please :laugh: check this code and let me know.. Thanks Rajeesh MP

                                  S Offline
                                  S Offline
                                  Stuart Dootson
                                  wrote on last edited by
                                  #16

                                  Rajeesh MP wrote:

                                  so in my dllmain.cpp contains

                                  DllMain doesn't really matter - when regsvr32 registers a control, it calls DllRegisterServer, which you should find in one of your other cpp files.

                                  Rajeesh MP wrote:

                                  After registering my AIM is not getting

                                  AIM? As in messaging?

                                  Rajeesh MP wrote:

                                  i m feeling this above code conversion is not proper..

                                  If it's ATL generated code, then I'm confident it's OK. The issue is more likely to be with the control registration data (the rgs files). Check that the CLSIDs and paths in those are OK Then you can open the registry (with regedit) and check that the registration in there is OK.

                                  Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                                  1 Reply Last reply
                                  0
                                  • S Stuart Dootson

                                    Rajeesh MP wrote:

                                    but i would like to know any alternate trik is there or not..like adding reference or linking

                                    Not really - building the UUID directly into the code is hte best way.

                                    Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                                    R Offline
                                    R Offline
                                    Rajeesh MP
                                    wrote on last edited by
                                    #17

                                    HI..Stuart My ATL 2008 application dllmain is contains

                                    CABCModule _AtlModule;

                                    abc.cpp is having

                                    STDAPI DllRegisterServer(void)
                                    {
                                    // registers object, typelib and all interfaces in typelib
                                    HRESULT hr = _AtlModule.DllRegisterServer();
                                    return hr;
                                    }

                                    // DllUnregisterServer - Removes entries from the system registry
                                    STDAPI DllUnregisterServer(void)
                                    {
                                    HRESULT hr = _AtlModule.DllUnregisterServer();
                                    return hr;
                                    }

                                    but my old application is

                                    CComModule _Module;

                                    BEGIN_OBJECT_MAP(ObjectMap)
                                    OBJECT_ENTRY(CLSID_ABCPP, CABCPP)
                                    END_OBJECT_MAP()

                                    STDAPI DllRegisterServer(void)
                                    {
                                    // registers object, typelib and all interfaces in typelib
                                    return _Module.RegisterServer(TRUE);
                                    }

                                    /////////////////////////////////////////////////////////////////////////////
                                    // DllUnregisterServer - Removes entries from the system registry

                                    STDAPI DllUnregisterServer(void)
                                    {
                                    return _Module.UnregisterServer(TRUE);
                                    }

                                    any difference is there this two codes..?? what s the difference b/w ... CABCModule _AtlModule; and CComModule _Module;:confused: i think becouse of this my dll is not working properly.. :zzz: how do i create CComModule _Module; project..in ATL dotnet2008..:confused: Regards Rajeesh MP

                                    S 1 Reply Last reply
                                    0
                                    • R Rajeesh MP

                                      HI..Stuart My ATL 2008 application dllmain is contains

                                      CABCModule _AtlModule;

                                      abc.cpp is having

                                      STDAPI DllRegisterServer(void)
                                      {
                                      // registers object, typelib and all interfaces in typelib
                                      HRESULT hr = _AtlModule.DllRegisterServer();
                                      return hr;
                                      }

                                      // DllUnregisterServer - Removes entries from the system registry
                                      STDAPI DllUnregisterServer(void)
                                      {
                                      HRESULT hr = _AtlModule.DllUnregisterServer();
                                      return hr;
                                      }

                                      but my old application is

                                      CComModule _Module;

                                      BEGIN_OBJECT_MAP(ObjectMap)
                                      OBJECT_ENTRY(CLSID_ABCPP, CABCPP)
                                      END_OBJECT_MAP()

                                      STDAPI DllRegisterServer(void)
                                      {
                                      // registers object, typelib and all interfaces in typelib
                                      return _Module.RegisterServer(TRUE);
                                      }

                                      /////////////////////////////////////////////////////////////////////////////
                                      // DllUnregisterServer - Removes entries from the system registry

                                      STDAPI DllUnregisterServer(void)
                                      {
                                      return _Module.UnregisterServer(TRUE);
                                      }

                                      any difference is there this two codes..?? what s the difference b/w ... CABCModule _AtlModule; and CComModule _Module;:confused: i think becouse of this my dll is not working properly.. :zzz: how do i create CComModule _Module; project..in ATL dotnet2008..:confused: Regards Rajeesh MP

                                      S Offline
                                      S Offline
                                      Stuart Dootson
                                      wrote on last edited by
                                      #18

                                      Rajeesh MP wrote:

                                      CABCModule _AtlModule; and CComModule _Module

                                      The ATL module classes changed. Not a big deal.

                                      Rajeesh MP wrote:

                                      i think becouse of this my dll is not working properly

                                      And why do you think your dll isn't working - what evidence do you have?

                                      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                                      R 1 Reply Last reply
                                      0
                                      • S Stuart Dootson

                                        Rajeesh MP wrote:

                                        CABCModule _AtlModule; and CComModule _Module

                                        The ATL module classes changed. Not a big deal.

                                        Rajeesh MP wrote:

                                        i think becouse of this my dll is not working properly

                                        And why do you think your dll isn't working - what evidence do you have?

                                        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                                        R Offline
                                        R Offline
                                        Rajeesh MP
                                        wrote on last edited by
                                        #19

                                        can u send me...ur personel ID... rajeeshmp@gmail.com

                                        1 Reply Last reply
                                        0
                                        • R Rajeesh MP

                                          Dear Stuart Uuid is same only.. i have a doubt

                                          #ifndef __AppFastLib_LIBRARY_DEFINED__
                                          #define __AppFastLib_LIBRARY_DEFINED__

                                          /* library AppFastLib */
                                          /* [helpstring][version][uuid] */

                                          EXTERN_C const IID LIBID_AppFastLib;
                                          #endif /* __AppFastLib_LIBRARY_DEFINED__ */

                                          /* Additional Prototypes for ALL interfaces */

                                          this is generating at compiling time in ABC_i.h if i m manualy trying to add my code. That would be deleted...

                                          EXTERN_C const CLSID CLSID_ABC;
                                          #ifdef __cplusplus
                                          class DECLSPEC_UUID("97676011-B0FA-40cf-AECC-7BD3FF54BE4E")
                                          ABC;
                                          #endif

                                          how do i add this class instant in ABC_i.h Regards Rajeesh

                                          R Offline
                                          R Offline
                                          rana ray
                                          wrote on last edited by
                                          #20

                                          did you solve it or not? I am into same kind of project and need help.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups