|
Hi,
i have an toolbar button on IE, and i just want to show an html popup with js effects on click event and again hide that popup on mousemove event,
i try to access js file from vb6.0 but not getting the desired results...
please try to give any link or suggesitons over this(call html/js attach to command button on ie)
thanks in advance.
amolk
amolk
|
|
|
|
|
I want to send and receive the binary data across systems. The problem I'm facing is, when a binary file is read and it is sent, the binary data will be sent upto the first encountering NULL character. So I'm wondering, how can I send.
Plzzzzz, help me in this issue.
Suggestions would be greatly appreciated.
Come online at:-
jubinc@skype
|
|
|
|
|
Hello,
Just try:
*.idl: HRESULT FunName([in,out] SAFEARRAY(BYTE)* pbtBufData);
*.h : STDMETHOD(FunName)(SAFEARRAY** pbtBufData);
*.c : STDMETHODIMP CClassName::FunName(SAFEARRAY** pbtBufData){...}
Regards,
|
|
|
|
|
ThanX lafleon very much!
I'll try with this.
Come online at:-
jubinc@skype
|
|
|
|
|
Hi,
I was wondering is it possible to monitor all the Active/COM objects as they are being instantiated by programs. I think it should be possible by hooking into the API that is used to get the interfaces to them. I have been trying to figure out which components are missing or not registered in the system but it is just too much pain trying to guess. I have searched on the net but have not found anything useful on the topic.
Thanks
|
|
|
|
|
Hi
I have a object.And i want to convert it into VT_DISPATCH variant.How can i do this.
|
|
|
|
|
VARIANT v;
V_VT(&v) = VT_DISPATCH;
obj->QueryInterface(IID_IDispatch, (void**)&V_DISPATCH(&v));
...
VariantClear(&v);
With best wishes,
Vita
|
|
|
|
|
Hi,
I have declared a smart pointer of COM interface globally.
When I call CoUninitialize in ExitInstance it throws an exception.
Because it is trying to release interface pointer twice.
How can I overcome this problem?
I have to declare interface pointer globally.
Hari om Tiwari
|
|
|
|
|
You are not supposed to call any COM API after calling CoUninitialize .
By declaring a com smart pointer globally, you are making call to IYourInterface-->Release() function.
|
|
|
|
|
Hello,
I have recently come across IServiceProvider::QueryService...
and although can use this function, do not know how the
services are created and what creates the SID_ constants.
I have used COM and come across CLSID_, IID_, but not SID_
Would you know the procedure for creating a service, using c++.
I use COM, visual c++ 6.0, c++ .NET 7.1.
Thankyou
|
|
|
|
|
Hi all,
In my code I have an IShellFolder object and a relative pidl to one of its subfolders, and I need to get the full pidl to the subfolder. If I use subfolder->GetDisplayNameOf() with SHGNO_FORPARSING and then calls desktopFolder->ParseDisplayName() with the display name I get the full pidl for pure file system and pure virtual objects. But for virtual objects with file system storage (for example “My Music”) it does not work, I get the pidl to the storage (that is “My Computer/Drive c:/Documents and Settinings/…”) and that is not what I want, I want the pidl to the virtual folder, that is “My Documents/My Music”. So, does anyone have any ideas how to get the full pidl to the virtual part of a folder that has both a virtual and a file system folder given its parent and a relative pidl?
-- modified at 7:44 Sunday 1st April, 2007
|
|
|
|
|
Please help me with this one, I cannot get around it.
|
|
|
|
|
I have written a class for operating the SQLCE database with OLE DB, it work perfect on INSERT ,UPTDATE and so on, but when I use 'select' statement to get values from database it doesn’t return values properly even though the GetNextRows method succeeds.
HRESULT hr = NOERROR;
m_pIRowset = NULL;
m_prghRows = &m_rghRows[0];
hr = pICmdText->SetCommandText(DBGUID_SQL, pwszQuery);
if(!FAILED(hr))
{
hr = pICmdText->Execute(NULL, IID_IRowset, NULL, NULL, (IUnknown **)&m_pIRowset);
if (FAILED(hr)){
AfxMessageBox(_T("failed"));
m_pIRowset = NULL;
}
// Get IColumnsInfo interface
hr = m_pIRowset->QueryInterface(IID_IColumnsInfo, (void**)&m_pIColumnsInfo);
if(FAILED(hr)){
AfxMessageBox(_T("failed"));
}
// Get the column metadata m_ulNumCols//m_pDBColumnInfo
hr = m_pIColumnsInfo->GetColumnInfo(&m_ulNumCols, &m_pDBColumnInfo,&m_pStringsBuffer);
if(FAILED(hr) || 0 == m_ulNumCols){
AfxMessageBox(_T("failed"));
}
// Create a DBBINDING array.
m_dwBindingSize = m_ulNumCols;
m_prgBinding = (DBBINDING*)CoTaskMemAlloc(sizeof(DBBINDING)*m_dwBindingSize);
if (NULL == m_prgBinding){
hr = E_OUTOFMEMORY;
AfxMessageBox(_T("Memory allocation failure"));
}
// Set initial offset for binding position
m_dwOffset = 0;
// Prepare structures to create the accessor
UINT lCount;
ULONG dwOrdinal;
for (lCount = 0; lCount< m_ulNumCols; lCount++)
{
dwOrdinal = m_pDBColumnInfo[lCount].iOrdinal;
m_prgBinding[lCount].iOrdinal = dwOrdinal;
m_prgBinding[lCount].dwPart = DBPART_VALUE | DBPART_STATUS | DBPART_LENGTH;
m_prgBinding[lCount].obLength = m_dwOffset;
m_prgBinding[lCount].obStatus = m_prgBinding[lCount].obLength + sizeof(ULONG);
m_prgBinding[lCount].obValue = m_prgBinding[lCount].obStatus + sizeof(DBSTATUS);
m_prgBinding[lCount].wType = m_pDBColumnInfo[lCount].wType;
m_prgBinding[lCount].pTypeInfo = NULL;
m_prgBinding[lCount].pObject = NULL;
m_prgBinding[lCount].pBindExt = NULL;
m_prgBinding[lCount].dwMemOwner = DBMEMOWNER_CLIENTOWNED;
m_prgBinding[lCount].dwFlags = 0;
m_prgBinding[lCount].bPrecision = m_pDBColumnInfo[lCount].bPrecision;
m_prgBinding[lCount].bScale = m_pDBColumnInfo[lCount].bScale;
switch(m_prgBinding[lCount].wType){
case DBTYPE_WSTR:
m_prgBinding[lCount].cbMaxLen = sizeof(WCHAR)*(m_pDBColumnInfo[lCount].ulColumnSize + 1); // Extra buffer for null terminator
break;
default:
m_prgBinding[lCount].cbMaxLen = m_pDBColumnInfo[lCount].ulColumnSize;
break;
}
// Calculate the offset, and properly align it
m_dwOffset = m_prgBinding[lCount].obValue + m_prgBinding[lCount].cbMaxLen;
m_dwOffset = ROUND_UP(m_dwOffset, 8);
}
// Get IAccessor interface
hr = m_pIRowset->QueryInterface(IID_IAccessor, (void**)&m_pIAccessor);
if(FAILED(hr))
{
AfxMessageBox(_T("failed"));
}
// Create the accessor
//
hr = m_pIAccessor->CreateAccessor(DBACCESSOR_ROWDATA, m_dwBindingSize,
m_prgBinding, 0, &m_hAccessor,NULL);
if(FAILED(hr))
{
AfxMessageBox(_T("failed"));
}
// Allocate data buffer.
//
m_pData = (BYTE*)CoTaskMemAlloc(m_dwOffset);
if (NULL == m_pData)
{
hr = E_OUTOFMEMORY;
CString errors;
errors.Format(_T("%d"),m_pDBColumnInfo[2].ulColumnSize);
MessageBox(NULL,errors,NULL,MB_OK);
AfxMessageBox(_T("failed"));
}
// Retrive a row
//
hr = m_pIRowset->GetNextRows(DB_NULL_HCHAPTER, 0, 1, &m_cRowsObtained,&m_prghRows);
if (SUCCEEDED(hr) && hr != DB_S_ENDOFROWSET)
{
// Set data buffer to zero
//
memset(m_pData, 0, m_dwOffset);
// Fetch actual data
hr = m_pIRowset->GetData(m_prghRows[0], m_hAccessor, m_pData);
if (FAILED(hr))
{
m_pIRowset->ReleaseRows(1, m_prghRows, NULL, NULL, NULL);
AfxMessageBox(_T("failed"));
}
}
if (hr == DB_S_ENDOFROWSET)
{
m_bIsEOF = TRUE;
}
}
venkat
|
|
|
|
|
I'm working on an excel application with data validation in it. The boss insists we use form controls such as checkbox or radio button. Is there any way to integrate these into an excel spreadsheet through COM Interop? If so, please provide an example or post a link. Also, we need to read the excel spreadsheet back through COM, so the controls need to be accessible later.
-- Steven Hunt
|
|
|
|
|
Have you ever heard of Microsoft Visual Studio Tools for Office (VSTO)? It allows one to automate Excel documents using .NET (in C# or VB). It supports dragging-and-dropping WinForms controls onto the worksheet. In addition, you can cache arbitrary data (e.g. the state of the controls) within the document and retrieve them outside of the Excel host environment.
For more information: Visual Studio Tools for Office
-Phil
Disclaimer: I work for Microsoft as a developer on the VSTO product team.
|
|
|
|
|
|
Hello friends,
i don't know anything about COM like how to create or use...Can anybody help me to find the right way to do it.
For example in my project i have a class that deals with all db operations i want to make it as com and use this in some other project please anybody help me ..
Regards
Alex.
|
|
|
|
|
|
Hello,
'COM+ Programming: A Practical Guide Using Visual C++ and ATL (With CD-ROM) by Pradeep Tapadiya' is much better. (See amazon.com)
Regards
|
|
|
|
|
I have a problem that I have not been able to resolve. I have a C# exe where I have exposed some interfaces. My problem is that every call to createobject creates a new instance of the application. What I need is one running application from which a client can connect to.
Scenario 1:
Application is launched from command line.
User connects to existing running application using createobject (this does not work...it creates another instance)
Scenario 2:
Application is not running
User run createobject to connect to launch application. App launches (however if another program does a createobject it creates yet another instance).
I have not found anything in my searches that have helped.
Someone please shed some light on this!
Thanks,
Loren
|
|
|
|
|
Hello,
Just check 'DECLARE_CLASSFACTORY_SINGLETON(...)' macro on MSDN.
Regards
|
|
|
|
|
Thanks...is there an equivalent C# implementation? My EXE is a C# program.
Loren
|
|
|
|
|
Hi, folks.
A VC++ project I'm working on was doing fine in VS 2003. However, under VS 2005 IInputObject is behaving erratically. Specifically, UIActivateIO gets called only when fActivate is false (toolbar losing focus), never when it's true (gaining focus).
More importantly, however, is that TranslateAcceleratorIO now never gets called at all. This makes it impossible to get user input from edit or combo controls on the toolbar.
Anyone else experiencing IInputObject adventures in VS 2005?
|
|
|
|
|
Hi All,
I need to write some Composite control in my ATL using com technology project.
My question is how i control the GUI ?
What I mean is - in MFC i define some control variable that i can control the GUI control in easy why - can i do it also in Composite control ?
Until now i use "ListView_SetColumn" or those command to change/add/find something in my list Control - but this way is not the simple way - does there is some simple way to use the control ?
I also could not do casting from the control the list view type.
Thanks for any help.
|
|
|
|
|
I have spent much time to do this but i can NOT complete.
I can Not take the control of Standard Toolbar of Microsoft Outlook ( Not Outlook Express ).
I hope to receive Comments from from other plz
(Sorry for my bad english :P)
|
|
|
|