|
too big for what man
?
gabby
|
|
|
|
|
Any idea how to include the branch parameter in via header for a REGISTER/ INVITE message. I am using Microsoft RTC 1.2 Client API calls.
I tried passing a XML file which acts upon the entered User account, Password, SIP URI, Server Address etc.. I don't know how to enter the branch parameter for via header which is a required field . It look slike as shown below...
Via: SIP/2.0/UDP 10.20.30.40:5060;branch=z9hG4bKDB2DC20E6BEB4E0FB3C0F299D0F3114D
|
|
|
|
|
Hi,
I have the same problem.If you got to know the way to do it, please do reply.
Thank you.
regards,
Hasini.
|
|
|
|
|
HI ,
Usinf DirectX and VC++ , how can i add text in video. means when i captured it ,, that text it also in that captured(saved on disk ) video.
thanx
Regards.
|
|
|
|
|
My code is as follows
May be i have mistake in it.
str gives nothing;
void CCloseDlg::OnDropFiles(HDROP hDropInfo)
{
AfxMessageBox ("Darg n drop");
LPTSTR str;
UINT n;
DragQueryFile( hDropInfo, 0xffffffff , str, n);
AfxMessageBox(str);
CDialog::OnDropFiles(hDropInfo);
}
plz make correction... i want to get whole path and file name
thanx
Regards.
Regards.
|
|
|
|
|
You have to allocate the buffer for the return value, and also use a correct file index:
TCHAR str[MAX_PATH];
UINT n = MAX_PATH;
UINT nFileCount = DragQueryFile( hDropInfo, 0xffffffff , str, n);
for (int fileIndex = 0; fileIndex < nFileCount; ++fileIndex)
{
DragQueryFile( hDropInfo, fileIndex , str, n);
AfxMessageBox(str);
}
|
|
|
|
|
Indeed you have errors
MSDN:
lpszFile
Address of a buffer to receive the file name of a dropped file when the function returns. This file name is a null-terminated string. If this parameter is NULL, DragQueryFile returns the required size, in characters, of the buffer.
You dont have a buffer, u just have an address
Anyway check this class[^]
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
See here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I need to group variables into different segments.
At runtime I have to get the absolute start-adresses and sizes of the sections (in dll and/or exe).
I know using dumbbin.exe (and the map-file) will give me some information.
keywords: data_seg, bss_seg, dumbbin
|
|
|
|
|
Dear Programmers,
I am working on an MFC/Dialog based project. I defined a function pointer in a class's header file as a static like below;
...
typedef BOOL (WINAPI *blTagHCWDOGEnable)(DWORD IN_dwSecTime);
static blTagHCWDOGEnable blHCWDOGEnable;
...
Then I initialised this function pointer from a dll with ordinary function (LoadLibrary(...) , GetProcAddress(...))
Everything is working OK in this class. I am able to use this function but when I try to use this function from another class I am encountering errors. As if something modifying content of function pointer and it is equaling to NULL.
What may cause this?
Thanks and best regards
|
|
|
|
|
Erkan Ermis wrote:
What may cause this?
The static keyword. Each file that uses your header file will get its own copy of the variable, so if you set it from one file, other files won't see the change.
Change static to extern and define the variable in one of the .cpp files without the extern keyword. That should help it to work.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have not applied yet but I am sure it will work.
Thanks for your clear explanation.
|
|
|
|
|
or you can use
typedef VOID (CALLBACK* PROCEDURE)(VOID);//or any parameter
PROCEDURE procedure;
dllhinst=LoadLibrary("x");
if (dllhinst!=NULL)
{
procedure=(PROCEDURE)GetProcAddress(dllhinst, "Function");
}
I can assure this will work very well
gabby
|
|
|
|
|
Hi, I am in the early stages of generating an app that runs from the system tray icon (never used this before). However, I am getting a compile error on the message map entry for WM_TRAY_MESSAGE (which is #defined earlier as WM_USER+1) :-
IMPLEMENT_DYNCREATE(CReminderView, CView)
BEGIN_MESSAGE_MAP(CReminderView, CView)
//{{AFX_MSG_MAP(CReminderView)
ON_MESSAGE(WM_TRAY_MESSAGE ,OnTrayNotify)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
The mapped function (in this class) is:-
afx_msg void CReminderView::OnTrayNotify(WPARAM wParam, LPARAM lParam)
{
....
}
The error I get is :-
error C2642: cast to pointer to member must be from related pointer to member
I don't understand the relevence of this error to the statement ON_MESSAGE(WM_TRAY_MESSAGE ,OnTrayNotify)
as the first parameter is a constant and the second is to a pointer to function contained
within this class. Where is the cast ?
Can someone get me back on the "straight and narrow" please ? (knowing me, it's probably something REALLY simple, but I can't see it !)
"Bewildered !""
|
|
|
|
|
The problem is that messages handled with ON_MESSAGE() (including OnTrayNotify() ) must return an LRESULT , not void . The cast is inside the ON_MESSAGE() macro. Look in the source for the macro to see how it works.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
O.K. - got it sorted !! Thanks for the help Ryan
"Bewildered"
|
|
|
|
|
Hello,
I need to design a dialogue that its shape is changed with the user interface. It is very similar to a tabbed dialogue box but the active propertysheet would be selected by the selection on a tree control. I remember from old times that VB has a container control that I can put several control on it and then when I set the visibility of the container to true, all of my control on that specific container become visible and vice versa. Is there any way that I can do this in VC6? I tried to do this by using CPropertySheet without any success. Any help of code sample appreciated.
Best regards
Dialogue container
|
|
|
|
|
I am using RasEnumConnections function of SDK to get list of active DUN connections. Its working fine under WINXP but under WIN2K it gives error code 632 or 0x278 which is ERROR_INVALID_EA_HANDLE. Can you tell me whats wrong with that. Same application is running on both OS. I have Plateform SDK 2001 installed and SP4 for WIN2K and SP1 for WINXP installed on my machines. I have used the sample sinppet given in MSDN.
Thanx in advance
Asif
|
|
|
|
|
This error might be caused by the RASCONN structure that you pass to the function.
According to the MSDN documentation, the RASCONN structure has a few extra members (dwFlags and luid) under Windows XP. These members are not supported in Windows 2000 environment. I presume that you are building the application on a Windows XP platform, and as such, the structure gets initialized to support all the features in Windows XP. It compiles under Windows XP properly, but will not run on Windows 2000.
In order to fix this, you need to go to your project's settings and into the compiler settings. In there, add an extra predefinition. For a list of definitions to use when specifying the minimum platform, see this[^] list in MSDN.
To support Windows 2000, you must define WINVER to 0x0500. Now when you compile your code, it produces an executable that runs on Windows 2000 and above.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi
I would like to write of algorithms WIN32 API.So that , I can understand easily.
Please give me an example of WIN API with algorithms.
Is it possible easy way to write algorithms.?
Please guide me and suggest me which book is useful for this.
Any help appreciated.
Best Regards.
Rajesh
rajesh
|
|
|
|
|
Hmm..
I don't quite understand your question. An algorithm is a set of predefined instructions that solve a specific problem or a problem of specific type. For example, solving an equation can be called an algorithm.
Win32 API, on the other hand, is used to program Microsoft Windows(r) environment, allowing the creating of Windows-compatible software. It has nothing to do with algorithms.
Could be a bit more specific about your problem. What is it that you are needed to do ? Write an algorithm to do something ? Write a Windows-application that does something ?
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi,
I have a framegrabber that snaps an image and sends it to a memory buffer at
m_pBuffer (type of LPVOID). I do not know the content structure of the m_pBuffer,
but i know i contains a 24bit RGB Bitmap. Doing the operation below (SetDIBitsToDevice),
allows me to plot the contents to the screen.
I want to transfer the contents of m_pBuffer to my own device context (CDC myDC),
so that i can use GetBitmapBits and manipulate the date prior to plotting on to the screen.
Can anyway point me on how to do this? Do i use SetDIBits, if so, how?
CClientDC dc(this);
if ( m_pBuffer == NULL ) return ;
pBitmapInfoRGB24->bmiHeader.biWidth = ImageSizeX ;
pBitmapInfoRGB24->bmiHeader.biHeight = - ImageSizeY;
// ------------------------------------------------------------------------
// Transfer the image to display
// ------------------------------------------------------------------------
SetDIBitsToDevice ( dc.GetSafeHdc(), 22, 25
, ImageSizeX, ImageSizeY
, 0, 0, 0, ImageSizeY
, &m_pBuffer
, pBitmapInfoRGB24
, DIB_RGB_COLORS);
bOnGoingRefresh = false ;
|
|
|
|
|
Have problem to synchronize between two events:
Grab_Image() ;Grab Image from CCD camera to an image Buffer
Read_Motor_Position() ;read the motor position
It is important to get minimum time between this two commands but sometime the time between the command become very large , as I understand this happened because the operation system ( Windows) "time slicing".
I need a solution to lock the system such this two command will be always execute together without any interference.
Michael Geffen
|
|
|
|
|
Michael geffen wrote:
I need a solution to lock the system such this two command will be always execute together without any interference.
You can't unless you use a third-party real-time extensions program. You can use SetThreadPriority() and SetPriorityClass() to give your thread realtime priority, which will give your application basically all of the CPU time. Just make sure you set the priority back to normal, or else the entire system will hang (even the clock will stop, and the mouse will become unresponsive). But even this doesn't guarantee that there won't be a context-switch in between those commands. There is nothing you can do without third-party extensions to guarantee this. Changing the thread's priority is the closest you'll get.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Actually, you can get just a little bit closer by forcing a contex-switch before the execution of the critical section... You can force a context switch by calling the Sleep api. After this function returns, your thread will start with a brand new timeslice
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|