|
Because i need to physically attach to the file in 'Downloaded Program Files' to copy a resource from inside the control onto the user machine. The control does not appear until after the return of DllRegister.
Carl
|
|
|
|
|
Why don't you add a key to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" that will execute a function in your DLL, like:
rundll32.exe yourdllpath.dll,YourFunc_RunDLL
YourFunc_RunDLL must be declared in your DLL like this:
int YourFunc_RunDLL(HWND parent, HINSTANCE hinst, LPCTSTR params) {
return 0;
}
My homepage is down cos' I violated their Terms and Conditions.
|
|
|
|
|
Why don't you add a key to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" that will execute a function in your DLL, like:
rundll32.exe yourdllpath.dll,YourFunc_RunDLL
YourFunc_RunDLL must be declared in your DLL like this:
int YourFunc_RunDLL(HWND parent, HINSTANCE hinst, LPCTSTR params) {
return 0;
}
You may need to tell the user to restart his computer for this to work. I know there is a system function you can call to make the OS execute the RunOnce entries, but don't have that in my mind right now!
My homepage is down cos' I violated their Terms and Conditions.
|
|
|
|
|
Hi all.
This snip of code from my appl.
Thats here not right.
///Try to Create IPicure interface for particular icon
IPicture* CConnect::CreateIPictureFromIcon(WORD hIco)const
{
HRSRC res = FindResource(_AtlModule.GetResourceInstance(),MAKEINTRESOURCE(hIco),RT_GROUP_ICON);
HGLOBAL hGlobalRes = LoadResource(_AtlModule.GetResourceInstance(), res);
LPVOID pvResData = LockResource(hGlobalRes);
size_t len = SizeofResource(_AtlModule.GetResourceInstance(),(HRSRC) res);
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE,len);
LPVOID pvData = GlobalLock( hGlobal );
memcpy(pvData,pvResData,len);
GlobalUnlock(hGlobal);
GlobalUnlock(hGlobalRes);
LPSTREAM pStream = NULL;
IPersistStream* IPersStream = NULL;
HRESULT hr =
CreateStreamOnHGlobal( hGlobal,TRUE,&pStream );
//hr == S_OK
IPicture* pPicture = NULL;
//////////!!!!!!!!!!!!!!!!!!!!!//////
//All fine till this place
//hr return E_UNEXPECTED
////////////////////////////////////
hr = OleLoadPicture(pStream,0,TRUE,IID_IPicture,(void**)&pPicture);
pStream->Release();
return pPicture;
}
Please help!!!
|
|
|
|
|
I am trying to code a (Visual Studio)C# test program in order to control an ActiveX component. The connection between the component and my test program is done.
The component exposes methods that use a parameter System.object. I don't know how I should make such a parameter. In the activeX component (coded in C++), this parameter is described as a pointer to a DISPATCH object (a IDataContainer type). As I'm quite new to COM and ActiveX, and I haven't found any information about how to make this function call?
thanks in advance,
See you,
SlY
|
|
|
|
|
Hope you know how to handle variants,
First, use a VARIANT as input parameter,
Then, check that input field type is Dispatch type
Next, QueryInterface the dispatch member of the variant field
Sorry, no time for sample, im at work.
|
|
|
|
|
Can someone point me in the right direction for creating download progress information while an activeX control is installing. presume it's some kind of callback but would appreciate some help.
I've used similar Callbacks for standalone apps, but not sure how the connections is made as i want information about myself as i'm downloading.
hmmm - Confused!
thanks in advance
Carl
|
|
|
|
|
Hi, I've created an ATL control with a full control (activeX) added to it.
It is downloading and registering properly, but Internet Explorer says the control is NOT marked safe for scripting. I've doen this with an MFC based control but don't know what to do for my ATL version.
Please Help
thanks
Carl
|
|
|
|
|
I found this one myself
http://support.microsoft.com/default.aspx?kbid=168371
thanks (2 myself)
|
|
|
|
|
Hi!
At this time I’m only using the ActiveX technology to publish my MFC application on the net. I’m about to make a call to may webpage like this:
http://www.mypage.com?user=bill&password=12345
How may I pass the “user” and the “password” into my ActiveX?
All suggestions are helpful.
_____________________________
...and justice for all
APe
|
|
|
|
|
how do you access your activex object ?
is it using the < object > tag ?
if so, how about you use the other tags that it can use (i cant remember the syntax)
< param user='< %=Request("user")%>' >
< param password='< %=Request("password")% > ' >
if you instantiate your control server side:
< %
myActiveX = new ActiveX("MyProg.Id");
myActiveX.User = String(Request("user"));
or
myActiveX.SetUser(String(Request("user")), String(Request("password")));
% >
my script code is in JScript since this is the flavor i prefer, but the same can be achieved using VBScript.
|
|
|
|
|
darkbyte wrote:
is it using the < object > tag ?
if so, how about you use the other tags that it can use (i cant remember the syntax)
< param user='< %=Request("user")%>' >
< param password='< %=Request("password")% > ' >
------------
I'm using the <object> tag.
Should I create a Property or a Method for my ActiveX (I'm using the ClassWizard in Visual Studio C++)
How to call any of these metods from the obect tag?
Tnx.
_____________________________
...and justice for all
APe
|
|
|
|
|
I think that any public property should be available for use in param tags.
but i would search any infos regarding < object > tag to see if anything can help.
DarkByte
|
|
|
|
|
Ok, any idea where to search for <object> tag. I've googled but no solution to my problem...
_____________________________
...and justice for all
APe
|
|
|
|
|
|
I m makeing ATL DLL using ATL COM Wizard
i m getting an error as follows
F:\rough work\atl2\atl2.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
for the line given below
[id(1), helpstring("method Connect")] HRESULT Connect(CString ip , int port);
how can i remove the eror
thanx
Regards.
|
|
|
|
|
Use BSTR instead of CString
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I have a simple test object with one method that opens an ADO connection, performs an insert, and closes the connection.
When I enlist the object in a transaction I incur a delay of about 15 seconds in destroying my closed connection object, both explicit using 'set cn = nothing' and implicitly if I omit the set and the object goes out of scope.
I am new to COM+ so any help would be appreciated.
My blog.
|
|
|
|
|
the problem
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IStageEvents'
error C2065: 'DIID__IStageEvents' : undeclared identifier
error C2065: 'LIBID_MoticMotorLib' : undeclared identifier
how to solve the problems above!
thanks!
andy_cn
|
|
|
|
|
how do i solve the problem,
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IStageEvents'
error C2970: 'IDispEventImpl' : template argument 'plibid' : invalid address of static variable 'LIBID_MoticMotorLib'
error C2065: 'DIID__IStageEvents' : undeclared identifier
error C2065: 'LIBID_MoticMotorLib' : undeclared identifier
thanks!
|
|
|
|
|
I suppose you failed to add the following line
#import "YourDLL"
using namespace THE DLLNAME
and add the dll into your current work space..
if this dosent solve the problem...do let me know
cheers
Balkrishna Talele
|
|
|
|
|
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
As a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks!
|
|
|
|
|
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
as a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks!
andy_cn
|
|
|
|
|
thank you very much for your reply!
I successed to add the following line
#import "C:\WINNT\System32\MoticMotor.dll" no_namespace named_guids
but I can't still solve the problem.
as a matter of fact,the problem only appears in the SinkObj.h, 'DIID__IStageEvents' can be used successfully in the file mygrabDlg.cpp( mygrabDlg.h), "mygrab" is the file name i inputed in the Appwizard when i start to create the MFC app.
thanks
andy_cn
|
|
|
|
|
Hy all!
I don't know is this the right place for this question, so my apologies if it isn't.
I have project written in C#, and now my new requirenment is that I must embed IE (i think that wizard generates ActiveX control?) in one of the forms. That control loads some html which has JavaScript code with which I must comunicate.
If anyone can shed some light on how to attack the problem, or point me the right way, I'll be grateful. And I promise if I get it to work I'll publish the code on CodeProject.
Thnx in advance.
|
|
|
|