|
hello everyone. I am in deep sh*t now. i have to develop a biometric authentication system which apply neural network algorithm , that is using handwritten signatures to authenticate users instead of combination of user id and passwords. I do not even know which language to use, some told me MATLAB, some said VB. so can anyone give guidance or sample source code to me so that i do not need to start from scratch since the time is running out.
thanks a lot and please help pass this message around so that i can have more things to refer
|
|
|
|
|
Hi all
I am trying to write an Asynchronous socket in an ocx. I have generated the MFC wizard ocx and created 2 new classes -- connect & listen, both derived from CAsyncSocket.
From the xxxApp.cpp, I have created the Main Socket which listens to accept connects from clients.
I made a call to "WSAAsyncSelect(MainSok,wind->m_hWnd , WM_USER+1,FD_ACCEPT | FD_READ); " also.
But I am unable to capture the events to start reading wot is being written to my socket.
I have also written code in the OnAccept of my MainSocket to accept connections. But this routine is not being called.
How do I now receive data asynchronously???
Please help.
Thanks in advance
Cheers
Raja
|
|
|
|
|
Hello All,
I want to know the code changes to be done for converting STA to MTA on the server side.
Thanks in advance.
|
|
|
|
|
To change your server's COM apartment, change:
CoInitialize(NULL);
to:
::CoInitializeEx(NULL, COINIT_MULTITHREADED);
Bear in mind you will have to use one of the suitable pre-processor declarations (such as _WIN32_DCOM) that will "include" the CoInitializeEx declaration, otherwise you'll get errors that it's an undefined function when you attempt to compile.
|
|
|
|
|
Hi, I have no experience with COM what so ever. I cant find any good articles that actually explain COM from scratch!. If anyone can tell me any sites that are good to start me off.
I use VS.NET, how do i create a new project step by step that uses for example the MSN messenger.exe, using C#??
cheers
|
|
|
|
|
|
Hi,
I'm looking for sample code for shell programming (infotip in particular) but the ones that are in the Shell Programming section of the site do not compile under Visual C++ .NET. Since the .NET 2002 version it seems that several macros have changed and the code generated by the wizards is different.
Would anyone have shell programming samples that do work under Visual C++ .NET 2002 or 2003 ?
fred.
|
|
|
|
|
I have a COM object that I have been using for some time in main applications.
I tried to use it in a dll and I get the error C2787: no GUID has been associated
with this object when I try o compile the code.
Are there any header files that I need to add that are not present in a dll but are included in a main windows application that would fix this problem?
|
|
|
|
|
Some component you're using is trying to use __uuidof to get the GUID for the interface/class, and it hasn't had a GUID associated with it using __declspec( uuid ) . This might be an ATL smart pointer, for example.
If the code is exactly the same, you might be using a different version of the SDK. Check your project's include directory settings.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
in the event you have moved from vc++ 6.0 to vc++ .net studio:
----------------------------------------------------------------
I recently had this problem when going from vc++ 6.o to vc++ .net
I had to move my include directories around (as the other poster suggested); I solved it
by putting the platform sdk inclused before the vc includes.
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)include
It really has to do with the macros that are defined
in the include files. see MS knowledge base article
"PRB: Error C2787 When Building a Project Using ATL 3.0"
sas
|
|
|
|
|
Hi,
I've been trying to create an ActiveX control to put a directX game in it .
But I can't manage to create a DirectGraphics8 Device for such a control.
IDirect3D8::CreateDevice(...) returns D3DERR_INVALIDCALL
(while the exact same call on a "standard" hWnd, doesn't fail (with all parameters set the same).
I think my problem is to get a handle I can use to create my device...
Can anybody help me doing it or can give me pointers to article that can help ?
thanks.
|
|
|
|
|
Hi All,
I have 2 executables, say A and B.
A uses some activex controls and COM components which I want to use from exe B.
I plan to use the SharedPropertyGroupManager for this, say common.dll
I plan to host this dll in MTS and set the object pooling property for Min and Max as 1 and 1. This dll will take in pointers to the activex components used by app A to store in the SPGM.
I plan to instantiate this dll, common.dll in App 'A' and pass the instantiated activex objects to store in SPGM.
I shall instantiate the common.dll from App B and try getting the objects stored by the SPGM.
Will this work??
Can someone help me with this? If this will not work, what is the work around?
Thanks in advance,
Cheers
Raja
|
|
|
|
|
I wrote an activex control that works well in W98.
It had some problems with extended chars in WinwowsXP, so I recompiled it using unicode support.
And now it works well in WinXP. But I can't register it win w98 nor in wme.
Have I got to distribuite 2 versions (98/me and 2000/xp) or there is some way to have only one activeX working on both systems?
Thanks
Paolo
|
|
|
|
|
Not being able to register sounds like it cannot be loaded. Chances are that you're using API calls which have UNICODE/ANSI versions, eg OpenFileA and OpenFileW. In the UNICODE build, it will be trying to pull in references from the DLLs like KERNEL32, USER32 etc. The XP versions have both ANSI and UNICODE entry points, but the Win9x versions don't, they only have ANSI.
This gives an error when loading the DLL.
To resolve it, you can
(a) have two builds (as you ask)
(b) Build only an ANSI version, but convert all string parameters (in and out) and properties to be BSTR, which are UNICODE strings.
This will require a little extra effort, as you may well need to convert from UNICODE to ANSI for use internally, but it's probably worth it.
Steve S
Developer for hire
|
|
|
|
|
[quote]Not being able to register sounds like it cannot be loaded.[/quote]
It crashes and then reports the error "LoadLibrary failed".
Yes, I'm using socket API with different unicode/ansi version.
At first I had only the ansi version, but it gave me some problems with ext chars; also I don't know where to convert from unicode to ANSI, because the VC++ Wizard declares the called function using "LPCTSTR"...
|
|
|
|
|
|
By using with interface, can i set this filter's special property that we can manully change in Directshow GraphEdit?
thx.
|
|
|
|
|
HI all,
I have a doubt..I have an simple MDI application whose View class is derived from IDispatch so i had implemented all the functions specific to IDispatch and also i have some functions specific to the view class.I have another DLL application in which i have to access that MDI view class fucntion.How can i do it?
|
|
|
|
|
I'm pretty new to COM programming so here goes my question. I've written a component that has some properties. One is written like
STDMETHODIMP CPopClient::get_Response(BSTR *pVal)
{
*pVal = (BSTR) m_bsResponse;
return S_OK;
} Would this be the correct way to use it
IPop->get_Response (&message.AllocSysString ()); Thinking about this I see a problem in that if the CString is null then I'm not allocating anything. So I guess I'm needing to know how I would call the above property from MFC. Thanks.
- Aaron
|
|
|
|
|
No, you need to use a BSTR implicitly.
BSTR bstrVal;
IPop->get_Response (bstrVal);
Your get_Response() implementation should be responsible for allocating storage. Your "client" must therefore free the BSTR when its finished with it. So, remember to call something like:
::SysFreeString(bstrVal);
Hope that helps!
|
|
|
|
|
Thank you for the information.
- Aaron
|
|
|
|
|
Aaron,
If you're using #import for your COM object, then why not use the nice wrappers implemented for you.
e.g.
_bstr_t bstrValue = IPop->GetResponse();
The wrapper tests for failed HRESULTS and also uses _bstr_t which handles Allocs and Deallocs for you.
Hope this helps,
Andy
|
|
|
|
|
AndyQ wrote:
_bstr_t bstrValue = IPop->GetResponse();
Can I use that even though the get_Response is implemeted with the return being a pointer parameter passed in, and the return is an HRESULT?
Thanks for the information on the _bstr_t class.
- Aaron
|
|
|
|
|
Aaron,
If you are using #import you should get two files in the project directory, e.g.
Pop.tli
Pop.thi
These are implementation and header files from the import process. Now you should get different versions of the same method calls. You'll have the 'raw' call that returns the HRESULT as you describe, but there should be another version that simplifies things, an example may look like:
inline _bstr_t IPop::GetResponse( ) {
BSTR _result;
HRESULT _hr = get_Response(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _bstr_t(_result, false);
}
Look for the files in your project directory (or debug/release directory) and look through them.
Hope this helps,
Andy
|
|
|
|
|
Ah, that makes a lot of sense now. I wasn't using #import, but that seems like a much better way to do it. I'll give that a go. Thanks very much for the help Andy.
- Aaron
|
|
|
|