|
Thank you !
rrrado
|
|
|
|
|
A question how typical Dispatch-Interfaces are designed:
Imagine you provide a Script client with a method returning a safearray, like this:
HRESULT GetData([out, retval] SAFEARRAY ** data)
Do you return a "complete copy", or can/should you return a reference to internal data held by the component?
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
I would have thought that you would need to return a copy.
I don't think you can access data across processes just by reference, some sort of accessor functions would be required.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Ofcourse it will be a reference to the actual memory location allocated from the com server.
A SAFEARRAY we create using by SafeArrayCreate or a BSTR we create by using SysAllocString are independent of the component which creates them. The client can manipulate the server allocated memory location. Remember in the case of a BSTR, the server calls SysAllocString and the client has the responsibility to call release by calling SysFreeString . Its like the server calls new and the client calls delete .
Or it is just like a com object we create inside a com server ( using CComObject ) and a cleint manipulates the properties of that server created object.
hope this helps..
rgds..mil10
|
|
|
|
|
Hi,
We specify the next step number for the resources, commands and control by the following.
_APS_NEXT_RESOURCE_VALUE
_APS_NEXT_COMMAND_VALUE
_APS_NEXT_CONTROL_VALUE
Do we have any way to restrict the numbers or specify the max limit.
eg. I want my resource to have command values from 1 to 100. So
#define _APS_NEXT_COMMAND_VALUE 1 // Next command number
Can I specify somewhere in the resource.h file saying 100 is the max if it goes beyond 100, throw an error?
Thanks,
Prashant.
|
|
|
|
|
PrashantJ wrote:
Can I specify somewhere in the resource.h file saying 100 is the max if it goes beyond 100, throw an error?
No, just don't add more than 100 of that type of resource.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I create context menu, receiving OnRButtonDown
from taskbar.
But how to detect that user clicked on someone else
place of desktop ?
- To destroy menu.
Or is it possible to create menu that auto-destroying,
when loosed focus ?
thanks.
______________
I found solution in MSDN
search file sample: CQA0211.exe
With installing hooks, and subclassing system windows...
Does it the right way to implement hiding menu ?
(seems not adequate)
|
|
|
|
|
Ru using TrackpopUpMenu() function call or u r using u r
own customised function?
If u r using TrackPopupMenu() call once u chech hwnd
parameter.
|
|
|
|
|
I USED TrackPopupMenu,
but menu does not disappear, if focus is loosed.
I asked - why it can happen?
|
|
|
|
|
I need to ceate a new file *.net and I want that file to have a own icon is there anyone that now how do to this?
Fast help please.
|
|
|
|
|
you will have to edit the registery,
create a key HKEY_CLASSES_ROOT\.net
with a default value of "NETFILE"
then create the key HKEY_CLASSES_ROOT\NETFILE
to give it an icon
create a sub key named "DefaultIcon" and set its default value to the path of the icon you want to use
then to add menu items to it create another sub key under NETFILE named "shell" then create a sub key under it, with the menu item name then under that key create yet another sub key named "command" and set its default value to the command line you want to use for that menu item, for example
"HKEY_CLASSES_ROOT\txtfile\shell\open\command"=
"C:\WINDOWS\NOTEPAD.EXE %1"
if you arent familiar with editing the registery this will sound very confusing, but its really not, you might check out the articals on shell extensions, i dont know if they cover this or not
|
|
|
|
|
|
Hi,
I am working on Project where i need to know the list of Windows2000 operating system's Users along with their Passwords. Also I want to know the rights or perticular user and want to use it to check for authorization purpose in my software. Any help plz..
My Function is like
void XYZ(int x, char b, char *UserName, char *Password, int UserId)
{
...
...
}
Now in this function I want to check if whether the passed UserName and Password exist on computer or not and if yes then what are the rights of that user...
Any one if able to do ...plz
MacCluny
|
|
|
|
|
serach for network management classes in cp.
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
NetUserEnum[^]?
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Hi all experts...i am a newbie in writing Window service. I need to write a program in c++ which need to run a service for windows xp. I hv no problem in CreateService() and StartService(). But when comes to StartServiceCtrlDispatcher(), it keep returning error 1063 (The service process could not connect to the service controller). Fyi, i was log in as administrator for my mechine. Please help me since i have already stuck here for 2 days... Thanks thanks thanks alot!!!
~bamboo stick~
|
|
|
|
|
If you call StartServiceCtrlDispatcher() and your program is running as a 'regular' executable, you will certianly get this error. The StartServiceCtrlDispatcher() call will only succeed when the service control manager is starting your program. So, if you are running your EXE and starting it under the debugger, then you will ALWAYS see this error. Perhaps you did not fill in the SERVICE_TABLE_ENTRY data correctly. If you did, check the registry to make sure your service got 'installed' correctly.
|
|
|
|
|
hi all
now i am doing a SDI project, all of the views are CFormview Derived , and switching the formviews according to the menu commands.
i want to implement a Dialogbar to my container, in such a way that i can show the status messages on that. i created the dialogbar from a dialog template and attached with the dialogbar object.
i need a static control in the dialog bar inorder to show the status in each forms. how can i set the static text in dialogbar ???
like static_Control_variable_in_dialogbar.SetWindowText("test ");
Any idea..??
programming in VB is like riding a kiddy bike, while programming in C++ is like driving a Formula 1 racing car
|
|
|
|
|
Since the dialogbar object is a member of frame class. You need to get the dialog bar object through AfxGetMainWnd.
Check this
void CTestView::OnBnClickedButton1()<br />
{<br />
CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd();<br />
if (pFrame)<br />
{<br />
pFrame->m_wndDialogBar.SetDlgItemText(IDC_MYSTATIC, "Hello");<br />
}<br />
<br />
}
This is a message handler of a form view class
The m_wndDialogBar is a public member of CMainFrame class
IDC_MYSTATIC is the id of the static control in the dialog bar. You must change the id of a static control from IDC_STATIC to another.
|
|
|
|
|
Hello everyone.
I want to learn DLL programming. If you know where I can find good tutorials or sites that I can learn basic DLL programming, it would be great if you tell me.
|
|
|
|
|
I want to find the length or Time of the wav file played, please can any one help me out with the code to find the Time for which wav file will be played..
|
|
|
|
|
Hi it's very simple.
Total Length of Play=Toatal No of samples/Sampling rate sec
|
|
|
|
|
Wav file is divide to chunks
This is the chank format:
----------------------------------
'RIFF' 4 bytes
size 4 bytes (ulong)
'WAVE' 4 bytes
'fmt ' 4 bytes
size 4 bytes (ulong)
<wave-format> 14 bytes
<format_specific> 2 bytes (PCM)
'data' 4 bytes
size 4 bytes (ulong)
<wave-data> N bytes
----------------------------------
the format of <wave-format> field is as follows:
wFormatTag, ushort
nChannels, ushort
nSamplesPerSec, ulong
nAvgBytesPerSec, ulong
nBlockAlign, ushort
Using this data and the previous snder reply you can calculater the duration of the wav file
DavidR
|
|
|
|
|
Hello,
I want to Get Messages From any windows in the screen
And then check the type of messages even when my
form has't the focus.(Of course without Timer);
(If there is any Example Plesae Tell me)
Best Wishes.
Thanks.
|
|
|
|
|
i think you are asking about Windows hook.
you may found tons of example at cp for this
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|