|
Hey, it was nice and easy, and I even fixed a bug in the code. Now to figure out what to do with the gigabytes of data I have instrumented...
|
|
|
|
|
I tried to register COM dll dsofile.dll in Vista Enterprise using regsvr32 but failed to register although I was login with administrator. I got following message :
"dsofile.dll was loaded but the call to DllregisterServer failed with error code 0x80050007".
So can someone please help me on registering COM dll in Vista.
Thank you.
|
|
|
|
|
Even though you've logged in as Administrator, did you run regsvr32 with Administrator privilege?
On the start menu, find the Command Prompt, right click then select Run As Administrator. In the command prompt window, type in the regsvr32 command.
|
|
|
|
|
Is there a way to pause a download and restart it using code in within the iTunes object?
Thanks For any help!
Regards;
Steve
|
|
|
|
|
hi all,
i have a dll say abc.dll loaded in memory and i have to unload abc.dll and load another dll of same name but it may differ in version number. i tried to unregister the first dll and register the second dll programatically. but still the code refers to the first dll. I think its because the first dll is still in memory. Am i right? Then how to completely remove the that dll from memory? I also renamed the first dll after unregistering it and then registered the second one. but it doesnt work.
|
|
|
|
|
If you look here: http://msdn.microsoft.com/en-us/library/ms690368(VS.85).aspx[^], you'll see:
MSDN says: Notes to Callers
You should not have to call DllCanUnloadNow directly. OLE calls it only through a call to the CoFreeUnusedLibraries function. When it returns S_OK, CoFreeUnusedLibraries frees the DLL.
You should call CoFreeUnusedLibraries after unregistering it. Also make sure that you have no live COM objects created by the DLL. If not, the DLL will have a reference count > 0, meaning that DllCanUnloadNow will return S_FALSE.
It could also be the case that reference counting in the DLL is buggy.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
Hi All,
Would like to ask regarding DCOM authentication...
in calling the function CoCreateinstanceEx with correct user name and password are provided why does the access denied error is still still encountered?
how are these information (username and password) actually used? Does the initial call to CoCreateInstanceEx passing the username and password also affects other calls like QueryInterface or other functions?
Thanks so much for any clarications about this.
ginji
|
|
|
|
|
Hi,
I have created a MFC Activex Control using C++ and I am trying to use that control in C# Windows Application. During Build it shows error as:
EgActivexCtrl fatal error LNK1104: cannot open file 'Debug/EgActivexCtrl.ocx'
Please help me to sort out this error... Thanks
Palanivel
|
|
|
|
|
Does the error message say anything else?
It would appear as if the OCX file is still in use. Do you have an app that uses the OCX still running? Check the process list in the task manager.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
I am new to COM and VBSCript. I am trying to get an automation function to return a status text string, so when writing script, the tester knows the status of an object under test.
This is how I declare and define the function:
DISP_FUNCTION(CScriptObject, "GetStatus", GetStatus, VT_BSTR, VTS_BSTR VTS_I4 VTS_BSTR)
BSTR CScriptObject::GetStatus(LPCTSTR Item, int ID, LPCTSTR WhichStatus)
{
return L("test");
}
the script is as follows:
dim string;
string = GetStatus "Item-A", 120, "Dummy"
When running it, virtual HRESULT __stdcall OnScriptError(IActiveScriptError *pscriptError) gives me the an error message, saying "string = GetStatus "Item-A", 120, "Dummy"" has error.
But running (GetStatus "Item-A", 120, "Dummy") alone is ok. By "ok" I mean the automation function "GetStatus" will be called.
Any idea how to have "GetStatus" to return some test string which can be used by VBScript? Thank you very much in advance!
|
|
|
|
|
Due to VB syntax requirement, you should parenthesize the parameters if use the return value:
string = GetStatus( "Item-A", 120, "Dummy" )
or
Call GetStatus( "Item-A", 120, "Dummy" )
or
GetStatus "Item-A", 120, "Dummy"
Also L("test") is not valid BSTR. Use SysAllocString etc.
With best wishes,
Vita
|
|
|
|
|
got it. Thanks a lot, Vi2!
|
|
|
|
|
hi Vita,
more questions.
When I use SysAllocString in the "GetStatus" function, where should I call SysFreeString to free up the memory? Will the following script do?
----------
option explicit
dim result
result = GetStatus ("Item-A", 120, "Dummy")
set result = nothing
------------
thanks a lot!
- Lucy
|
|
|
|
|
Does anyone know if you can do this without having to resort to remoting via sockets?
What I want to do is host a .NET assembly from inside a mixed-mode EXE file so that I can run the CLR profiler API from within the EXE host and modify the IL of the hosted assembly as the application is running. Now I know that .NET remoting lets you do this via sockets, but is there a faster way to doing this...perhaps through named pipes, or through some other means of interprocess communication?
|
|
|
|
|
|
what is aggregation in COM and how it is different from containment ?
|
|
|
|
|
If object X with interface I1 is aggregated with object Y with interface I2, both interfaces are reachable through IUnknown::QueryInterface(). Eventhough they're two separate objects, they behave as if they were one and the same.
Containment is when object X holds a reference to object Y, but X's QueryInterface() won't give you any of Y's interfaces (and vice versa). They behave as two separate objects.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
I am using an application in which ,Com server is exporting some functionality to client..
i know that ,com server are of two types in-proc and out-of proc....
i also know that.. in-proc server loads inside client memory space , where as out-of-proc loads in its own memory space,
so my question is that, how we decide that , we want to load server in client memory space(in-proc) or let it loads in its own memory space(out-proc)
In other words, what are the design requirements by which we decide on the type of Com server ?
|
|
|
|
|
Two relevant points:
(1) When client and server are on the local machine then in-process servers have better performance.
(2) Out-of-process servers crashes (usually) don't cause client application crash and vice-versa.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thannks a lot
|
|
|
|
|
I'm new in this area.
My question is that, can we use directshow to creaye encryption/decryption code for windows media player plugin to secure our video stream?
Is there any other possible method that can do this?
I wish that i can read a step by step tutorial on this. I tried using DSP Plugin wizard but still fail to decrypt the video stream as i couldn't decrypt it frame by frame.
Thank you in advanced.
|
|
|
|
|
Windows Media DRM will do this for you. The stream is encrypted between the server and the user's machine, then decrypted before being displayed.
|
|
|
|
|
Since COM dll cannot be used without registering, so i want to convert COM dll to Normal dll so that i can use dll without registering
|
|
|
|
|
Windows XP and later support a feature called Registration-Free COM. To use this, your COM DLLs must have an Assembly Manifest[^] and the application must have an Application Manifest[^] declaring the assemblies it uses. These can be provided as .manifest files copied alongside the DLL and EXE files.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Hi,
I have code to find simulated a EHCI controller. But i alway get error 0x80070057 when want to get DSFDevice from DSFDevices collection. Please help me.
const IID_CLSID= "{E927C266-5364-449E-AE52-D6A782AFDA9C}"
......
STDMETHODIMP CLoopbackDevice::CheckSimulatedDev(BSTR CLSID, VARIANT_BOOL *pvBool)
{
HRESULT hr = S_OK;
CComPtr<IDSF> spDsf;
CComPtr<IDSFDevices> spDsfDevices;
CComPtr<IDSFDevice> spDsfDevice;
long mDeviceCount = 0;
short mValue = 0;
*pvBool = VARIANT_FALSE;
hr = spDsf.CoCreateInstance(__uuidof(DSF));
IfFailHrGo(hr); //Go to Exit
//Get Dsfdevices list from root
IfFailHrGo(spDsf->get_Devices(reinterpret_cast<DSFDevices **>(&spDsfDevices)));
//Get number of device in list
IfFailHrGo(spDsfDevices->get_Count(&mDeviceCount));
for(INT i =1; i<= mDeviceCount; i++)
{
VARIANT vt;
VariantInit(&vt);
vt.vt = VT_INT;
vt.intVal = i;
IfFailHrGo(spDsfDevices->get_Item(vt, (DSFDevice **)(&mDsfDevice))); //<-- Error from here
hr = spDsfDevice->HasObject(CLSID, &mValue);
if (mValue && SUCCEEDED (hr) )
{
*pvBool = VARIANT_TRUE;
break;
}
}
Exit:
printf("HR = 0x%X\n", hr); //--->0x80070057
// RELEASE(spDsf);
return hr;
}
xuanthinh
<div class="ForumMod">modified on Tuesday, April 22, 2008 12:09 AM</div>
|
|
|
|