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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
L

Logan from Singapore

@Logan from Singapore
About
Posts
36
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Monitoring Network availbility and Windows Service in VC6 [modified]
    L Logan from Singapore

    Replying to my own message... I have found the method of achieving both items that I was looking for. I just want to close this message in case anyone is also looking for anything like this. 1) For writing a Windows Service in VC6, I have found a great article on CodeProject http://www.codeproject.com/KB/system/serviceskeleton.aspx\[[^](http://www.codeproject.com/KB/system/serviceskeleton.aspx "New Window")]"> 2) For this, it is more tricky. I have found a service called Network Location Awareness and by doing a search on the internet for this, you will find some very useful information or you can have a look at this article http://www.codeproject.com/KB/IP/NLA.aspx\[[^](http://www.codeproject.com/KB/IP/NLA.aspx "New Window")]"> Hope this information is useful and thanks to anyone that have given a thought to my questions. Cheers :-D

    People live with their choices.

    C / C++ / MFC csharp dotnet sysadmin help tutorial

  • Monitoring Network availbility and Windows Service in VC6 [modified]
    L Logan from Singapore

    Hi, I am looking for the way to write 1) a Windows Service in VC6 and 2) a method to monitor network availablility in VC6. I have actually done a service that will monitor the network availablility in VS2005 but due to some situation, I am not allowed to have .Net framework 2.0 on the system that I want to install this service. I am looking for the equivalent of

    using System.Net.NetworkInformation;
    NetworkChange.NetworkAvailabilityChanged += OnAvaiabilityChanged;
    

    in VC6 and also maybe an article of how to write a Windows Service in VC6. Any help will be appreciated. :-D

    People live with their choices.

    modified on Tuesday, May 20, 2008 1:54 AM

    C / C++ / MFC csharp dotnet sysadmin help tutorial

  • DLL Technology
    L Logan from Singapore

    Yes, I do understand that COM is not a DLL technology. But it can be used to create a DLL and it is one of the more advance method of writing a DLL. I was just hoping to know if there is any other methods to write a DLL other than this and the older method that exports the function. I apologise for my rude reply again.

    COM c++ com question csharp java

  • DLL Technology
    L Logan from Singapore

    I know what I want, maybe you should read what I had written again before answering... Pardon me for my rudeness as I do realise that you seems to be very experience... one puzzling issue is that you recent replies do not seems to match your experience.. if fact it seems like an amateur I said that I had did a COM DLL project, a DLL written in a form of COM component. Currently what I found out was that written DLL in COM component is one of the latest way of writing a DLL. I just need to if there were any newer way of writing a DLL.:) -- modified at 22:09 Wednesday 21st June, 2006

    COM c++ com question csharp java

  • ATL COM object..
    L Logan from Singapore

    Hi Siva, To do that, you can add a class like what you normally do. Thereafter is the tricky part, to remove the class and leave the interface around. To do that, in the idl file remove the code below for your second class. [ uuid(8D1E05B3-F610-4450-984E-4DCC4D2442E5), helpstring("SubClass1 Class") ] coclass SubClass1 { [default] interface ISubClass1; }; In your second class's header file, remove the 2 lines below. The second line will remove unnecessary register entry. public CComCoClass, DECLARE_REGISTRY_RESOURCEID(IDR_SUBCLASS1) In the main cpp file, remove this line OBJECT_ENTRY(CLSID_SubClass1, CSubClass1) If I do not remember wrongly that will be it, 2 interface in one COM object. I had done this in one of my DLL and it works. But if I do not remember wrongly again, you will not be able to see your second interface in VB or .Net whichever the client u are using. What I did, I had to pass the interface out. Hence I will see the interface like this in VB. dim a as FirstClass a.SecondClass.method() Hope I got your question right as I had also spend a lot of time on something like that.

    COM c++ com question

  • Start COM programming
    L Logan from Singapore

    Hi, I managed to get myself started with one of the article in this forum that shows some very easy examples for beginers. One think about COM is do you want the learn to do the full coding by hand. If that's the case, you may want to read up Essential COM which is highly recommended in this forum. It will show you some of the things that happen in the developement of the COM technology. If you need to get something up fast, you may want to work with the ATL. There are plenty of articles on using ATL in this forum.

    COM question com learning

  • DLL Technology
    L Logan from Singapore

    Hi, I had started a COM DLL project about a year back. When I did a research on DLL back then, I found this is one of the more advance methods of doing it. Before I started the project, I was expecting it to be cross-platform and cross-language but it did not seems to be the case after I finish it. I had managed to get my DLL working for .Net, VB6 (with a bit of difficult for array passing) and VC6++ (which need extensive coding). I am still trying to figure out how to use it in Java. I am currently wondering if this is the latest way of writing a DLL (I use the ATL COM wizard). I found out that VC6++ also offers MFC DLL and ActiveX ocx. Can anyone tell me what is the different between these 3? It seems that using the OCX method will help with reducing the coding when used in VC6++. Again my questions are: 1. What is the latest method of writing a DLL? 2. What is the different between creating a DLL/OCX with ATL COM AppWizard, MFC ActiveX Control Wizard and MFC AppWizard? Any information will be appreicated. As I am very keen in learning more about the technology available. Thanks in advance.

    COM c++ com question csharp java

  • Calling COM DLL in Pocket PC
    L Logan from Singapore

    Hi, I am have some problems calling a DLL in embedded Pocket PC. The CoCreateInstance reply a error "Class not registered." I have already register the DLL in the Pocket PC device and even in the emulator but I still keep getting the same error. I have a running version for desktop but the same is having problems on embedded. In debug mode, I found that the DLLMain's parameter dwReason is = DLL_PROCESS_DETACH. Can someone please help me? Thanks in advance.

    ATL / WTL / STL help com hardware debugging question

  • Calling COM DLL in Pocket PC
    L Logan from Singapore

    Hi, I am have some problems calling a DLL in embedded Pocket PC. The CoCreateInstance reply a error "Class not registered." I have already register the DLL in the Pocket PC device and even in the emulator but I still keep getting the same error. I have a running version for desktop but the same is having problems on embedded. In debug mode, I found that the DLLMain's parameter dwReason is = DLL_PROCESS_DETACH. Can someone please help me? Thanks in advance.

    COM help com hardware debugging question

  • Calling COM DLL in Pocket PC
    L Logan from Singapore

    Hi, I am have some problems calling a DLL in embedded Pocket PC. The CoCreateInstance reply a error "Class not registered." I have already register the DLL in the Pocket PC device and even in the emulator but I still keep getting the same error. I have a running version for desktop but the same is having problems on embedded. Can someone please help me? Thanks in advance. -- modified at 0:42 Thursday 5th January, 2006

    Mobile help com hardware question announcement

  • Capturing Events
    L Logan from Singapore

    Thanks Bio. I had already read the article when I was doing my research. It was a great article. I had initially intended to use "Event Sink" to solve my problem but I work around it by another mean. Actually, I had a COM DLL with multiple objects within it. But I had only expose the main object class. My problem arise when one of my internal object needs to fire a event to the app using my DLL. As only the main interface is expose, the internal object can't fire the event direct to the app. I was trying use the main object to sink the event and fire it again. But I never really got the way for doing the sink coding properly. Nonetheless, I worked around it by send the point to the main object inwards to the internal object and use this pointer to fire the event. It may not be the proper way to solve the problem but it solve my problem for now. Nonetheless, thanks for the help again. (If you remember, you had help this fellow Singaporean on several other occasion.) Cheers -- modified at 22:09 Tuesday 22nd November, 2005

    ATL / WTL / STL c++ help

  • Capturing Events
    L Logan from Singapore

    Thanks Eric. Wasn't what I was look 4 but appreicated the help.

    ATL / WTL / STL c++ help

  • Capturing Events
    L Logan from Singapore

    Hi, I have a method the fires an event. But I have not been able to find the way to capture the event in VC++. I can get this event through VB but I need it in VC. Please help. Thanks in advance.

    ATL / WTL / STL c++ help

  • Passing of Array
    L Logan from Singapore

    Thanks for replying. I also happened to read about this in your interest exchange below after I had posted the thread. This had cleared my doubts on why people are passing it as a Variant:-D.

    COM question csharp java com data-structures

  • Passing of Array
    L Logan from Singapore

    Hi, I had been trying to find methods to pass array from a COM DLL and had come across 2 ways of doing it. method(SafeArray(Type) **pVal); method(Variant *pVal); What is the different between passing the array out as a SafeArray and as a Variant? What is the advantage of using either of them? Are both methods supported by all technologies like .Net, Java, etc...?

    COM question csharp java com data-structures

  • AddRef() Error
    L Logan from Singapore

    Hi, I have the following code in my DLL. InnerClass* pInnerClass; CComObject* pInnerC; HRESULT hr = CComObject::CreateInstance(&pInnerC); hr = pMyC->QueryInterface(IID_IInnerClass, reinterpret_cast <>(&pInnerClass)); STDMETHODIMP CMyClass::get_InnerClass(IInnerClass **pVal) { if (pVal == NULL) return E_POINTER; *pVal = pInnerClass; (*pVal)->AddRef(); return S_OK; } I have no problem with the code when I compile my code without Unicode, i.e. I have not problem running my DLL. But when I compile in Unicode mode, I always get the error: Unhandled exception in Demo.exe(MyClass.DLL): 0xC0000005: Access Violation After my debug, it seems that the line (*pVal)->AddRef(); is giving me the problem. But if the line is removed, I will have the same problem in all mode of compiling. Please help me..:((

    COM help debugging

  • Difference in the compiling modes
    L Logan from Singapore

    Thanks for the reply. One of the few good reply I had read. There are too many replies in this forum that never asks the questions.

    COM question announcement

  • Difference in the compiling modes
    L Logan from Singapore

    Hi, Can someone tell me what is the difference between compiling in the following mode?? Win32 Release MinSize Win32 Release MinDependency Win32 Unicode Release MinSize Win32 Unicode Release MinDependency Thanks in advance

    COM question announcement

  • how to create COM DLL ..Help Me
    L Logan from Singapore

    Hi, I am also new to COM and I manage to create my 1st DLL from this article. http://www.codeproject.com/atl/SimpleATLCom.asp Hope it is useful to you.:) Regards w_logan

    COM com help tutorial

  • Help!!!!! Need to do COM DLL with multiple objects
    L Logan from Singapore

    Thanks for the quick reply and thanks for taking the trouble to reply even when you are on vacation. One last question, how do you think the VB recordset example I use is implemented? Currently what I feel is that recordset is a get_property under ADODC and when this is call the pointer to the recordset object is in my COM is passed returned. But I found a project in code project that use a method to implement this, It does return the pointer of the inner object. Please dun take too much of your time on this, just give me your nbest guess. Thanks and enjoy your holiday.

    COM com algorithms help question
  • Login

  • Don't have an account? Register

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