|
8204 is equal to VT_ARRAY | VT_VARIANT. The variant contains an array of VARIANTs.
With best wishes,
Vita
|
|
|
|
|
Vita,
thanks for the response.
Thing is, I am still unsure how to actually access the contents of this array.
for example:
_variant_t vRow;
vRow = vtRows[0];
does not compile.
Thanks again
Phil
|
|
|
|
|
Try to use CComSafeArray<VARIANT> to make access to array. And statement to obtain constructor's parameter:
SAFEARRAY *pSA = V_ISBYREF(&vtRows) ? *(V_ARRAYREF(&vtRows)) : V_ARRAY(&vtRows);
With best wishes,
Vita
|
|
|
|
|
hi,
I'hv a BHO built in VC6(ATL/COM) which is needed to create a toolbar button and on buton click i need to use the api UrlDownloadtoFile which is need to download a file to a specific location and called webbrowser.navigate to make it navigate to a specific file
Com works fine in XP but it problem started when it is used in Vista
are these API not supported in Vista or there a updated set of SDK which is need to downloaded to make it work
i have read the inks regarding the Protected Mode Restriction and some other articles related to Intergrity level in Vista but still can't find the solution.
settings for phishing filter and enabled add-ons but still of no use.
BHO dosen't work in either Protected Mode "ON/OFF"
plz Reply if there is a solution(if possible for Protected Mode OFF firstly)
Help Would be greatly Appreciated
Abhishek
|
|
|
|
|
Hi,
If I install a VirtualPC on my Windows Vista OS, does this Virtual OS completely has it's on COM Server funcionality or does it use the COM technique from the original OS?
|
|
|
|
|
gehbitte wrote: does this Virtual OS completely has it's on COM Server funcionality or does it use the COM technique from the original OS?
virtual OS has it's own COM servers - it is completely separate!
Think - the virtual OS could be Linux, with no COM at all!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Hello everyone,
I have written a small test application. The application is splitted into two parts. The first part is written in unmanaged C++ using ATL. It creates a normal window in which a .NET control will be loaded using the class ATL::CAxWindow. Besides two interfaces (IExtensionInfo, ITreeItem) and TreeItem coclass are defined in the library.
The second part is a C# class library containing one UserControl. The C# part references the type library from the part written in C++.
Here is an small overview.
C# Part: class Extension : UserControl, IExtensionInfo
C++ Part:
class CMainWindow
class CTreeitem : ITreeItem
And here is the IDL code for the interfaces.
interface ITreeItem : IDispatch
{
HRESULT AddChild(void);
HRESULT GetChildCount([out,retval] LONG* pChildCount);
};
interface IExtensionInfo : IUnknown
{
HRESULT GetCaption([out, retval] BSTR* caption);
HRESULT SetCaption([in] BSTR caption);
HRESULT Init([in] ITreeItem* ipTreeItem);
HRESULT Unload(void);
};
Now we came to the core part: Creating the C# control and host it in a container; Creating a TreeItem object and passing the interface pointer to the C# part.
When the Init method is not called to pass the interface pointer to the C# control then everything is doing just fine. But when it is called then the application remains in memory after the window is closed.
LRESULT CMainWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HRESULT hr;
_AtlModule.Lock();
this->m_pCtrlWindow = new CAxWindow();
RECT rect;
this->GetClientRect(&rect);
HWND hControlWindow = this->m_pCtrlWindow->Create(this->m_hWnd, rect, NULL, WS_CHILD | WS_VISIBLE);
IUnknown *pUnknownControl;
hr = this->m_pCtrlWindow->CreateControlEx(L"CsControlInNativeWindow.Extension", NULL, NULL, &pUnknownControl);
this->m_spExtensionInfo = pUnknownControl;
if (pUnknownControl)
{
pUnknownControl->Release();
}
this->m_spTreeItem.CoCreateInstance(CLSID_TreeItem);
this->m_spExtensionInfo->Init(this->m_spTreeItem);
return 0;
}
LRESULT CMainWindow::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (this->m_spTreeItem)
{
this->m_spTreeItem.Release();
}
if (this->m_spExtensionInfo)
{
this->m_spExtensionInfo->Unload();
this->m_spExtensionInfo.Release();
}
if (this->m_pCtrlWindow)
{
this->m_pCtrlWindow->DestroyWindow();
delete this->m_pCtrlWindow;
this->m_pCtrlWindow = NULL;
}
_AtlModule.Unlock();
return 0;
}
I hope someone can tell me how I can make that the application shuts down.
Best regards.
|
|
|
|
|
Hi all,
I am developing an online dictionary using asp.net 3.5, C# and SQL SERVER; I want to add speech capability to this application. now I found "Interop.HTTSLib.dll" suitable for this, but there is a problem: this application works fine locally but does not work in a remote host and I get this error: " Retrieving the COM class factory for component with CLSID {2398E32F-5C6E-11D1-8C65-0060081841DE} failed due to the following error: 80040154."
Does the kind of server(x86 or x64, 32bit or 64bit) make this problem or asp.net authorization is the main reason? I am using www.aspspider .com (free asp.net hosting) as my host.
Here is my C# code:
protected void Button1_Click(object sender, EventArgs e)
{
string temp = TextBox1.Text.Trim();
HTTSLib.TextToSpeechClass speech = new HTTSLib.TextToSpeechClass();
speech.Speak(temp);
}
Finally how I can fix this problem, I am really thankful for any help.
|
|
|
|
|
That error == REGDB_E_CLASSNOTREG - see what it says about it in CoCreateInstance[^].
Is your test-to-speech library installed into the remote host?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
When you perform speech.Speak on your local machine, does it just play the audio directly? Have you got a second PC you can test from (connect to the web server on your main PC using a browser on another PC) - try again - does the sound play from the PC running the server?
If you try and use this on a real server, you'll be trying to play the audio on the server side, which probably doesn't even have a sound card installed. You'll need a text to speech engine that outputs to an audio file which you can stream to the client instead.
|
|
|
|
|
Hi All,
I have a com dll which i want to use without registering it so is it possible? i tried it this way but while trying to call its functions i am not getting its reference....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
|
Well, It will works on development enviroment, but so far i know, good practics is to use RegAsm.
Thanks
Md. Marufuzzaman
|
|
|
|
|
I have trouble in getting Scanner and Camera wizard started to import pictures from a removable
Device(such as USB mass storage) through API. Could someone give me some direction?
I know Wia.AutoplayHandler.1 is the one do the job, but I don't know how shell uses Wia.AutoplayHandler.1 and then I don't know how to simulate shell to call it.
In general, when user plug in a MSD device, windows will pop up a Autoplay dialog, and when user select import, a import wizard will pop up. What I need to do is to popup this import wizard dialog and tell the wizard the path(as g:\) where to import, then the wizard will show pictures in the MSD device to user.
The component HKEY_CLASSES_ROOT\WIA.AutoplayDropHandler.1 looks like the thing the wizard uses. But I still don't know the right way to use it as shell does.
|
|
|
|
|
Hi,
I Created one Activex control in c#.net.i assigned stong name to assambly,i registered the assembly,created setup and created the cab file and compiled.
i created one asp.net web application and added Html page and call the activex method in onload using object tag by using javascript.i'm using ie7 to run the application.browser throwing error immediatly as 'Object doesn't support this property or method' i enabled the options in Tools -> InternetOptions -> Security -> Custom level -> enable the Download un signed Activex controls and intialize the unsafe scripting too.
please provide me solution to solve my issue.and how to run the activex control by using iis.how to use the .cab zip file.am struggling alot from long time.plz..plz.. how your will helps me alot..
thanks in advance
krishna
|
|
|
|
|
Hi
Are you sure you added ClassInterfaceAttribute to your class like the sample below?
<br />
using System.Runtime.InteropServices;<br />
<br />
[ClassInterface(ClassInterfaceType.AutoDispatch)]<br />
public class MyClass<br />
{<br />
public MyClass() {}<br />
}<br />
<br />
ClassInterfaceType.AutoDispatch is required if you wanna your class be accessed through a script.
|
|
|
|
|
Hi, still am getting same error sither for the ClassInterface(ClassInterfaceType.AutoDual) or
ClassInterface(ClassInterfaceType.AutoDispatch).if we updated the class of activex control is it required to do create the strong name to the assembly,register the assembly and create the cab file again.
thanks and regards,
krishna
|
|
|
|
|
I'm doing C# interop with Direct3D (I know about SlimDX and XNA so let's not get into the merits of this) and I'm calling D3DX10CreateMesh passing it my ID3DX10Mesh interface. I'm getting an error saying "No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))". The D3DX10CreateMesh call comes while I am trying to create a 10 mesh to copy a 9 mesh into (after successfully loading an x file). I've looked at my C# definition of the ID3DX10Mesh and it follows the same structure as every other working interface I've defined.
But then I noticed something. The Guids for the 9 and 10 meshes are *exactly* the same (4020E5C2-1403-4929-883F-E2E849FAC195). I've double checked the d3dx9mesh and d3dx10mesh headers and this is the case. The 9 mesh interface works but the 10 doesn't (This maybe be instantiation-order dependent) I personally don't understand this as it would imply that even in C/C++ apps you couldn't use the two meshes together but we know that you can. I've seen it done in NVUT SDK. I can only think that the Runtime Callable Wrapper is getting confused byt the Guids?
Why would the mesh guids be the same (seems ridiculous to me) and how are C/C++ apps able to avoid the conflict?
PS. I've posted this in the COM forum because the problem is COM not Direct3D.
modified on Thursday, July 16, 2009 9:56 AM
|
|
|
|
|
Klempie wrote: Why would the mesh guids be the same (seems ridiculous to me) and how are C/C++ apps able to avoid the conflict?
Yes, I believe this is normal. DirectX10 is backwards compatible with DirectX9. Only new/incompatible interfaces will have new guid.
Best Wishes,
-David Delaune
|
|
|
|
|
That's just the thing though. The methods on the two interfaces are completely different so I'm not sure how they would be compatible. It looks like I will be forced to do what I need to without using the 10 mesh.
|
|
|
|
|
If the methods on the ID3DX10Mesh are completely different from the DX9 version (differing signature parameters, causing it to be incompatible at the binary level), then it seems ridiculous that GUIDs would be the same (as Don Box would say, it violates the basic precept of COM). And, since, I can't imagine the Microsoft DirectX Team screwing up something that obvious and simple, there MUST be another rational explanation.
Anyway, it's good to know,...I'll stick with DirectX 9,...I understand it.
|
|
|
|
|
Yup. The methods do not match up parameter wise, nor do they even match up in terms of implied functionality from the naming.
|
|
|
|
|
I want to know which window message is generated when a volume is inserted, i.e when i insert card in memory card reader's slot an autorun dialog box appears it means there must be some message that is generated when i insert memory card in the slot, I have tried WM_DEVICEARRIVED and also WMI Win32_DeviceChangeEvent but they get fired when I insert the reader into USB slot not when i change the card, but window shows auto run dialog box i want to know that low level window message that is generated when i insert or remove card form slot not the whole card reader.
sssssssss
|
|
|
|
|