|
|
|
Yes I did..
Should I put "AfxInitRichEdit" Before or After CoInitialize..
Thanks
|
|
|
|
|
Is there somewhere a tutorial of about how does the pluggins are created to Internet explorer. What is the specific for that - registry entries, implementing interfaces...
|
|
|
|
|
RegSvr32: LoadLibrary("\Xyz.dll") failed
GetLastError returns 0x000003e6
Using VC++5.0. Thanks
|
|
|
|
|
0x000003e6 = "Invalid access to memory location."
Like it or not, I'm right.
|
|
|
|
|
Thanks for your response. I looked at the winerror.h and I found out about what error means etc.
I am looking for a solution ?
|
|
|
|
|
I'm looking for a pointer in the right direction, if someone can help.
I need to create an ActiveX control which displays in a frame window and which can be hosted by IE. In other words, rather than a control which sits on the web page's background, I need the control to pop up in its own frame window. As various events happen on the web page, custom methods / properties on the control will be invoked. All the ATL samples and other examples I can find which have a UI / GDI aspect to them just sit on the web page's background. So I'm not sure the best way to go about this.
It would seem that, after creating an ATL project and adding an ATL ActiveX control, there are two options: 1) modify the generated code in the control to somehow make it a window with a frame that floats outside the browser's window. I'm not sure if that's feasible given that IE controls the window's creation and its initial style settings. 2) Make the control that IE knows about UI-free but have it create a frame window / control and perhaps delegate custom interface methods on the "main" control to this control. That seems feasible, but it always helps to see something nominally similar as a starting point.
If anyone could point me to an example or some docs that cover this type of control, I'd appreciate it.
Thanks,
Donnie
|
|
|
|
|
Design you ActiveX as singleton and run that ActiveX in another IE window. By creating an instance of that object you always will have only one shared instance.
soptest
|
|
|
|
|
I'm looking for a free alternative to ATL. Some sort of COM wrapper library that can be used with a free compiler like MingW or Borland C++. Is there such a thing?
|
|
|
|
|
Yeap, there is, but is in beta stage
COMET
It's look promising, it only have a macro !!! The code uses templates instead to do message dispatching
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
Interesting, I'll take a look at it. Thanks.
|
|
|
|
|
Hi All,
I have a simple ASP page that connects to a COM Component to add some data to my Database, it works 100% apart from the fact that it runs it twice?
Is this a known problem or could someone explain how I can stop this.
Here is the code from my ASP Page
AppMonitor = Server.CreateObject("AppMonitor.LoginDetails").InitialLogin
(Application("cdscConnection"), gstrAccountName, Session.SessionID, stest)
and the actual component
Public Function InitialLogin( _
ByVal ConnectionString As String, _
ByVal AccountName As String, _
ByVal SessionID As String, _
ByRef stest As Variant _
) As Long
Dim UserID As String
UserID = "sa"
Dim Password As String
Password = ""
Dim sql As String
sql = "EXEC cdsc_TBTrace 0, '" & Replace(AccountName, "'", "''") & "', " & SessionID
On Error GoTo ErrorHandler
Set cn = New ADODB.Connection
cn.Open (ConnectionString)
cn.Execute (sql)
stest = "Success"
cn.Close
ErrorHandler:
With Err
stest = Err.Description & "<BR>" & Err.Number
End With
End Function
Thanks,
Gavin
|
|
|
|
|
Sombody gave me a book about DCOM and its for VC6.I install VC7 now on my computer.Does ATL7 changes a lot and Does it have lots of difference if I use that book in VC7?
Thanks
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
|
hi~
Thanks for reading my problem.
I'm not good at english.
I hope for u to understand me.
I make a DCOM service with Visual C++ 6.0.
I want that COM Server returns an array of datas, ex 10 number of integers.
I wrote idl like this.
[id(2), helpstring("method B")] HRESULT B([out] long* plCount, [out, size_is(, *plCount)] long** pplData);
and wrote implementation as follows,
STDMETHODIMP CMyB::B(long *plCount, long **pplData)
{
*plCount = 10;
*pplData = static_cast<long*>(::CoTaskMemAlloc(sizeof(long) * *plCount));
for (int nIndex = 0; nIndex < *plCount; nIndex++)
*(*pplData + nIndex) = 5000 + nIndex;
return S_OK;
}
when I call this method in client,
I expect the result like {5000, 5001, 5002, 5003...}.
but I get 5000 and gabarge. {5000, ....invalid data...}
I debuged server program and I can identifed all the elements are set correctly.
but client has only 1 data.
Why this occur?
How can I solve this?
and...
now, I treat 'long' type data.
but, I want to treat custom type(struct etc...) in the future, also.
I hope for u save me.
goodday~
|
|
|
|
|
I would use a SAFEARRAY.
In VC++6.0 you will need to the SAFEARRAY Win32 calls yourself. This is made easier in VC++7.0 as you can use the class CComSafeArray wrapper.
One tip, if your using Automation clients, make sure you specify the data type inside the SAFEARRAY in your MIDL file e.g. for a long...
[(id(1)] HRESULT MyMethod([out]SAFEARRAY(long)* sa)
Sample code can be found at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q207931
-----
Andrew Farrell
Liquid Technologies
http://www.code-generator.com
|
|
|
|
|
He wants to use custom types. But safearray is automation type for arrays.
soptest
|
|
|
|
|
You must create proxy/stub DLL for custom data marshaling.
Go to your Obj path and find YourObj.mk, build this make file (you can "Insert Project into Workspace" rename *.mk to *.mak and add this mkae file to Workspace)
and after you register your com obj register produced proxy/stub DLL.
P.S. on build machine you must register proxy/stub file every time you rebuild your COM object project.
soptest
|
|
|
|
|
Thank you.
You flew my trouble.
now I'm happy
goodday~
|
|
|
|
|
I would like to use a COM interface in a multithreaded project. Is there a sample available any where ? Any tips/pointers would be helpful. Thanks.
|
|
|
|
|
See this
Marshall, GIT
and if you care, this
GPF with atl and vb
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
'Gpf with Atl and VB' is a good example. Thanks Vaz!!
|
|
|
|
|
Hi All,
I have a dll that works great in VB/ASP, but when I created an .idl file, I get an error when compiling:
.\test.idl(31) : error MIDL2025 : syntax error : expecting a type specification near "<"
.\test.idl(31) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
below is where it is happening:
NOTE: On the following line, I had to put quotes in the code so you could see the code because it looked like a TAG in HTML...("<"GetRefTypeInfo failed">"**)
HRESULT GetItem([in, out] VARIANT* Server,
[in, out] VARIANT* Category,
[in, out] VARIANT* CType,
[out, retval] ("<"GetRefTypeInfo failed">"** );
The idl file was generated by OLE View (cut/paste) to test.idl and compiled with "C:>MIDL test.idl /h test.h"
Can anyone tell me why this is giving this error
Regards,
Dan
|
|
|
|
|
What's worng with the following code. I am getting
"Unhandled exception in XYZ.exe (OLE32.DLL):0xC000005: Access Violation"
(Note: This message board is eating off any thing within < > and hence you will find << >> instead of < > to avoid it)
#import <<comapp.dll>> no_namespace
class CMyClass :: public CWinApp
{
....
public:
CWinThread *m_Thread;
static UINT WorkerThreadProc(LPVOID pParam);
IComAppPtr g_pIComApp;
...
};
CMyClass::CMyClass()
{
g_pIComApp = *(new IComAppPtr(__uuidof(ComApp)));
g_pIComApp->XYZ();
m_Thread = AfxBeginThread((AFX_THREADPROC)WorkerThreadProc, static_cast<<lp_void>>(this), THREAD_PRIORITY_ABOVE_NORMAL, 0);
};
UINT CMyClass::WorkerThreadProc(LPVOID pParam)
{
CMyClass *mPtr = static_cast<<cmyclass *="">>(pParam);
/*******************************
// Whats wrong here? When I call the following function
// I get ACCESS VIOLATION OLE32.dll
mPtr->g_pIComApp->XYZ();
//******************************************
};
Thanks for your help.
|
|
|
|