|
Now you can tell us...
|
|
|
|
|
It will be great if you post solution so that other can refer this question as guideline.
Thanks
Mahesh
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
hi guys
today i define a CSocket instance 'sock'
code is :
CSocket sock<br />
Sock.Socket ()<br />
before i have call AfxSocketInit()
these code is program in a dll ,
when i build a Dialogue to call dll WINAPI to implement the top code
program will assert in below
<br />
void PASCAL CAsyncSocket::AttachHandle(<br />
SOCKET hSocket, CAsyncSocket* pSocket, BOOL bDead)<br />
{<br />
_AFX_SOCK_THREAD_STATE* pState = _afxSockThreadState;<br />
<br />
BOOL bEnable = AfxEnableMemoryTracking(FALSE);<br />
<br />
TRY <br />
{<br />
if (!bDead)<br />
{<br />
ASSERT(CAsyncSocket::LookupHandle(hSocket, bDead) == NULL);<br />
if (pState->m_pmapSocketHandle->IsEmpty())
...}<br />
can someone tell me why thank you
|
|
|
|
|
jeansea wrote: if (pState->m_pmapSocketHandle->IsEmpty())//assert here
Technically, there is no assertion on that line. If either pState or m_pmapSocketHandle were NULL , you'd get an access violation or a null pointer exception. You may have to go into the IsEmpty() method to find the line that actually asserted.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello all,
I have checked all the iaxclient.dll document, but i am not getting any function which can create a conference.
My problem is i want to make a call, than after holding 1st call, i have to make second call. Here i am able to hold 1st call by
int iaxc_quelch (int callNo, int MOH) function and able to make another call, But Now i want to combine both port so that all three of us can talk. so for that i am looking function but not getting anything.
So can anyone suggest me how to create conference????
Regards,
New_bie
|
|
|
|
|
I have a folder and I determine name of the folder.
Inside this folder, I put some text file with random name file.
How is the way I access a text file inside that folder?
There is a filelistbox in visual Basic. Is there any equivalent function in Visual C++ 6.0? so that, I can list text file inside that folder and access it.
Please help me to solve this problem.
Thank you before....
//------------------------------------------------------------
Thanks for all who have help me to solve my problem.
modified on Thursday, September 10, 2009 2:17 AM
|
|
|
|
|
Eka Candra wrote: Is there any equivalent function in Visual C++ 6.0? so that, I can list text file inside that folder and access it.
Check FindFirstFile[^] and FindNextFile [^]
|
|
|
|
|
thanks Naveen for your answer.
I already tried that function, but those fuctions needs name of file as input function.
But actually the case is I don't know exactly name of files inside the folder.
Do you know any other solutions?
Thanks before,
Eka Candra
|
|
|
|
|
Eka Candra wrote: but those fuctions needs name of file as input function.
The file name can include wild char. And in your case since you need only text file, you can pass the file name as "*.txt". This will cause the function to return only the files with extension ".txt" under that folder.
|
|
|
|
|
Just try with the below logic to parse even the directory inside directory for search
CStringArray m_FileList;
void SearchFile( LPCTSTR lpszFolder )
{
CFileFind ff;
CString csFolder = lpszFolder;
if( _T( '\\' ) != csFolder[csFolder.GetLength()-1])
{
csFolder += _T( "\\*.*" );
}
BOOL bWorking = ff.FindFile(csFolder );
while(bWorking)
{
bWorking = ff.FindNextFile();
CString csTemp = ff.GetFilePath();
if(!ff.IsDots() && ff.IsDirectory())
{
SearchFile( ff.GetFilePath() );
}
if(!ff.IsDirectory())
{
CString csName = ff.GetFilePath();
if( -1 != csName.Find( _T( ".txt" ), 0 ))
{
m_FileList.Add( csName );
}
}
}
}
Величие не Бога может быть недооценена.
|
|
|
|
|
Eka Candra wrote: There is a filelistbox in visual Basic. Is there any equivalent function in Visual C++ 6.0? so that, I can list text file inside that folder and access it.
GetOpenFilename[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
modified on Thursday, September 10, 2009 2:15 AM
|
|
|
|
|
Eka Candra wrote: There is a filelistbox in visual Basic. Is there any equivalent function in Visual C++ 6.0? so that, I can list text file inside that folder and access it.
Are you talking about sending the LB_DIR message to a listbox?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello,
Is there a way to hide applicaiton menu at runtime? I would like to hide the menu once everything is loaded and once the application starts running. The application is written in vc++ 6.0 and the window is created using CreateWindowEx, I tried different dlg_styles options to hide it, but it still shows the menu.
Any suggestions??
thanks,
PKNT
|
|
|
|
|
create window with one menu and use ShowWindow function for hide the window.
Thanks and Regards,
Selvam,
http://www.wincpp.com
|
|
|
|
|
I would like to hide the menu only not the whole application window(thats easy as you said using showwindow function).
thanks though
PKNT
|
|
|
|
|
I don't find any direct function support from windows programming. We may use MENUINFO Structure for change style( ex, MNS_AUTODISMISS, mask MIM_BACKGROUND).
Thanks and Regards,
Selvam,
http://www.wincpp.com
modified on Thursday, September 10, 2009 1:31 AM
|
|
|
|
|
> I don't find any direct function support from windows programming
?????
1 line of code, first page of MSDN Win32 menu api list !!!
|
|
|
|
|
I've seen $3 bills that had more value than your response.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Is there any Microsoft SDK or any other library or source code
to help with downloading MMS stream
Thanx for help
viliam
|
|
|
|
|
|
Hi,
I wrote a program using VC++ that should scan for available wireless networks in the area.
In my SW I use the commands OID_802_11_BSSID_LIST_SCAN and OID_802_11_BSSID_LIST.
My questions are:
1. How can I Force the Wireless NIC to do ACTIVE SCAN ?
2. According to tests that I did, the card does not flush the list between scans, i.e. I get for several scan a results of an AP that was on air during an old scan, but is no longer there and new scans return's it's data as if it is still there.
I am using Intel PRO 2200BG Wireless NIC, with driver version 8.1.0.28 (dated 24/8/2004).
Relevant information That I used is here:
Some relevant info from the above link:
---------------------------------------
"
The device must do the following when performing an explicit scan in response to a setting of OID_802_11_BSSID_LIST_SCAN:
* The device must flush the current contents of its cached BSSID scan list before initiating the explicit scan request.
* The device must scan both infrastructure and ad hoc networks, regardless of the current setting of its network mode.
* The device can use either the active or passive scanning methods, or a combination of both scanning methods.
Note Active scanning is preferred whenever appropriate.
* When performing an active scan, the device sets the BSSID to the broadcast MAC address in the 802.11 probe request that it sends. The device also sets the SSID to the zero-length broadcast SSID in the probe request.
* The device must perform the scan across all the frequency channels and bands that it supports.
* The miniport driver must minimize its response time for this OID. It is recommended that the driver just initiate the scan and return NDIS_STATUS_SUCCESS in response to the setting of OID_802_11_BSSID_LIST_SCAN. The driver must not return NDIS_STATUS_PENDING or wait for the scan to complete before returning NDIS_STATUS_SUCCESS.
"
-------
Any help will be appreciated.
-- Amit.
|
|
|
|
|
|
NDIS_802_11_BSSID_LIST* m_pBSSIDList;
m_pBSSIDList = (NDIS_802_11_BSSID_LIST *) VirtualAlloc (NULL,
sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE) ;
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
oidcode = OID_802_11_BSSID_LIST_SCAN;
DeviceIoControl (m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof(oidcode),
(ULONG *) NULL,
0,
&bytesreturned,
NULL);
Sleep (6100);
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
oidcode = OID_802_11_BSSID_LIST;
if (DeviceIoControl( m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof( oidcode),
( ULONG *) m_pBSSIDList,
sizeof( NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
&bytesreturned,
NULL) == 0)
{
return NULL;
}
else
{
return m_pBSSIDList;
}
|
|
|
|
|
i have a CString :"121 232 3232"
i want to cut it into 3 pieces : "121" ; "232"; "3232"
and convert them to "int". can you help me? Thanks!
|
|
|
|
|
CStringT::Tokenize is the method for you, have a look at the nice example in the documentation [^].
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
[My articles]
|
|
|
|