|
For simplicity, I periodically backup my development folders using Xcopy with the exclude option. The common part of my exclude list is: (There may be extensions in there specific to some things we do, but it works regardless.)
.aps
.bsc
.cod
.err
.exp
.idb
.ilk
.jbf
.lst
.map
.ncb
.obj
.opt
.pcc
.pch
.pdb
.plg
.res
.rsp
.rtt
.rtb
.sbr
.sup
.stt
.swp
buildlog.htm
mt.dep
.intermediate.manifest
.embed.manifest
\bin\Debug
\bin\Release
\obj\Debug
\obj\Release
|
|
|
|
|
Thanks Joe, thats a useful list.
Thanks also to everyone else who replied also.
|
|
|
|
|
Hi Developers,
I have created a custom control bar for doc & float enable window. The problem i am facing is that, i can't restrict it's min and max size as well as it is not getting paint while i am moving or resize it. I have tried Invalidate() in OnSize() but it doesn't work.
Can anyone help me out.
Thanks.
Amrit Agrawal
Software Developer.
|
|
|
|
|
Have you tried handling the WM_GETMINMAXINFO message for the window?
You can specify min/max sizes such a control can be sized to.
If you vote me down, my score will only get lower
|
|
|
|
|
Is there a way to get the options in a Html.SELECT object (Combo box) without using the IDispatch.
The reason for not using IDispatch is that I am using FireFox which does not have/support/implement IDispatch.
All I can use is IAccessible. Any Suggestions.
|
|
|
|
|
Dear friends,
Please help me to know how to get the list of available active windows port using vc++ at one time itself.
For Example : To get the available com port using Devive Manager
Thanks in Advance
kumar
|
|
|
|
|
|
I run 1 or 2 thread at button click and on second button click I am closing dialog box but I am checking before closing thread to treminate.
pThreadHandle = new HANDLE[nCount] ;
....
....
....
WaitForMultipleObjects(nCount,pThreadHandle,TRUE,INFINITE)
But It goes in infinte lopp and dialog never ends. How it is wating for infinite?
Give me suggestion to do so.
|
|
|
|
|
need to check your thread function, how are you closing/intimating your thread to close? let us know the function code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
One of your thread function might not be exiting. Do they have any looping code ?
It's better you post your thread functions here.
|
|
|
|
|
Either of the threads are not exiting.
Put some logging code like OutputDebugString or printf or write something to a file from the thread so that you can get at what is going on inside the thread.
|
|
|
|
|
Hi,
In the application which I'm working on. Bluetooth server on pc, exchanges text with bluetooth client on mobile.
I would like to what is the GUID needs to be registered for this text exchange service.
I'm currently using
GUID serviceID = OBEXFileTransferServiceClass_UUID;
But it doesn't seem to work.
Thanks in advance.
Regards,
Vijay.
|
|
|
|
|
OBEX is used to send files.
For sending simple text, use SerialPortServiceClass_UUID .
|
|
|
|
|
HI,
I'm using windows 7 , 64 bit os, and had written bluetooth server program running on this pc.
This server will accept connections from clients , and display the text sent by clients.
My issue is , Bluetooth server running on PC, is not receiving data sent from clients, but connection establishment is successful.
What I mean is, after executing "recv(s2,(char*)buffer, sizeof(buffer), 0);" function call, the server is blocked indefinitely.
Please let me know how this issue could be resolved.
#include "stdafx.h"
#include <WinSock2.h>
#include <ws2bth.h>
#include <bthsdpdef.h>
#include <BluetoothAPIs.h>
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "irprops.lib")
TCHAR *GetLastErrorMessage(DWORD last_error)
{
static TCHAR errmsg[512];
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
0,
last_error,
0,
errmsg,
511,
NULL))
{
return (GetLastErrorMessage(GetLastError()));
}
return errmsg;
}
int _tmain(int argc, _TCHAR* argv[])
{
WORD wVersionRequested = 0x202;
WSADATA m_data;
if (0 == WSAStartup(wVersionRequested, &m_data))
{
SOCKET s = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM);
const DWORD lastError = ::GetLastError();
if (s == INVALID_SOCKET)
{
printf("Failed to get bluetooth socket! %s\n", GetLastErrorMessage(lastError));
exit(1);
}
WSAPROTOCOL_INFO protocolInfo;
int protocolInfoSize = sizeof(protocolInfo);
if (0 != getsockopt(s, SOL_SOCKET, SO_PROTOCOL_INFO, (char*)&protocolInfo, &protocolInfoSize))
{
exit(1);
}
SOCKADDR_BTH address;
address.addressFamily = AF_BTH;
address.btAddr = 0;
address.serviceClassId = GUID_NULL;
address.port = BT_PORT_ANY;
sockaddr *pAddr = (sockaddr*)&address;
if (0 != bind(s, pAddr, sizeof(SOCKADDR_BTH)))
{
printf("%s\n", GetLastErrorMessage(GetLastError()));
}
else
{
printf("\nBinding Successful....\n");
int length = sizeof(SOCKADDR_BTH) ;
getsockname(s,(sockaddr*)&address,&length);
wprintf (L"Local Bluetooth device is %04x%08x \nServer channel = %d\n", GET_NAP(address.btAddr), GET_SAP(address.btAddr), address.port);
}
int size = sizeof(SOCKADDR_BTH);
if (0 != getsockname(s, pAddr, &size))
{
printf("%s\n", GetLastErrorMessage(GetLastError()));
}
if (0 != listen(s, 10))
{
printf("%s\n", GetLastErrorMessage(GetLastError()));
}
WSAQUERYSET service;
memset(&service, 0, sizeof(service));
service.dwSize = sizeof(service);
service.lpszServiceInstanceName = _T("Accelerometer Data...");
service.lpszComment = _T("Pushing data to PC");
GUID serviceID = OBEXFileTransferServiceClass_UUID;
service.lpServiceClassId = &serviceID;
service.dwNumberOfCsAddrs = 1;
service.dwNameSpace = NS_BTH;
CSADDR_INFO csAddr;
memset(&csAddr, 0, sizeof(csAddr));
csAddr.LocalAddr.iSockaddrLength = sizeof(SOCKADDR_BTH);
csAddr.LocalAddr.lpSockaddr = pAddr;
csAddr.iSocketType = SOCK_STREAM;
csAddr.iProtocol = BTHPROTO_RFCOMM;
service.lpcsaBuffer = &csAddr;
if (0 != WSASetService(&service, RNRSERVICE_REGISTER, 0))
{
printf("Service registration failed....");
printf("%d\n", GetLastErrorMessage(GetLastError()));
}
else
{
printf("\nService registration Successful....\n");
}
printf("\nBefore accept.........");
SOCKADDR_BTH sab2;
int ilen = sizeof(sab2);
SOCKET s2 = accept (s,(sockaddr*)&sab2, &ilen);
if (s2 == INVALID_SOCKET)
{
wprintf (L"Socket bind, error %d\n", WSAGetLastError ());
}
wprintf (L"\nConnection came from %04x%08x to channel %d\n",
GET_NAP(sab2.btAddr), GET_SAP(sab2.btAddr), sab2.port);
wprintf (L"\nAfter Accept\n");
unsigned char buffer[2000];
while(1)
{
memset(buffer, 0, sizeof(buffer));
int r = recv(s2,(char*)buffer, sizeof(buffer), 0);
printf("Error = %d\n",WSAGetLastError() );
wprintf(L"Received : %s\n",buffer);
Sleep(500);
}
closesocket(s2);
if (0 != WSASetService(&service, RNRSERVICE_DELETE, 0))
{
printf("%s\n", GetLastErrorMessage(GetLastError()));
}
closesocket(s);
WSACleanup();
}
return 0 ;
}
Here is the snapshot, where you can see server is waiting, (executing recv())
http://dl.dropbox.com/u/37131873/Pics/6675.jpg[^]
Thanks in advance.
Regards,
Vijay.
|
|
|
|
|
Use SerialPortServiceClass_UUID for the serviceClassId parameter.
|
|
|
|
|
Hello to everybody,
I wrote a simple code for data reading and writing from USB HID device.
My code looks as follows:
HidDeviceObject = CreateFile (
(LPCTSTR)DevicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
In this way I open device for communication (synchronously).
Now I create two threads, one for data reading and one for data writing to device.
This is read thread:
while(TRUE)
{
if(!WRITE_BUTTON)
{
if (HidDeviceObject != INVALID_HANDLE_VALUE)
{
CancelIo(HidDeviceObject);
int Result = ReadFile(HidDeviceObject, &InputReport, sizeof(InputReport), & NumberOfBytesRead,NULL);
}
}
}
where WRITE_BUTTON is flag( if I click on write button in my GUI, WRITE_BUTTON is equal to 1, else 0)
My write thread is:
while(TRUE)
{
if(WRITE_BUTTON)
{
if (HidDeviceObject != INVALID_HANDLE_VALUE)
{
CancelIo(HidDeviceObject);
int Result = WriteFile(HidDeviceObject,&OutputReport, sizeof(OutputReport), & NumberOfBytesWriten, NULL);
WRITE_ROPRT = FALSE;
}
}
I am new in thread programing, and I need help fast. If I comment one of the threads, second one works fine. Where is my mistake? How to make them to works together in the same time? I want to send some data to device and wait for device to respond to me. When I open device with async flag (asynchronously) ( instead 0 in CreateFile function, I put FILE_FLAG_OVERLAPPED) threads works fine together, and I can send data to device and "capture" response from it.
Thanks
|
|
|
|
|
|
Hi!
I've developed a dialog based MFC application which embeds flash movie(.swf files) in it. Some more things I've used in this application are:
(i) CInternetSession
(ii)IXMLHTTPRequestPtr
I've to port this application to Linux and Mac. Is it possible? If yes, what tool is needed(Of course, it should be free)? Will Linux and Mac support .OCX(Activex) components?
modified on Monday, August 29, 2011 5:12 AM
|
|
|
|
|
|
Do I need to install any specific library to port my application? Or changing the class and Event names as told is enough?
|
|
|
|
|
wxWidgets is a library (just like MFC is)... it needs to be installed to be used...
|
|
|
|
|
Consider to use Qt if wanting to implement a cross platform native application.
Another alternative is to use Silverlight and .NET.
|
|
|
|
|
Hi!
Is it available free? Won't there be any license issues? Can you please confirm these things before I decide to use Qt? If it's payable, how much is the cost?
modified on Tuesday, August 30, 2011 1:12 AM
|
|
|
|
|
|
Hi all,
i want to write multiple files inside a loop simultaneously. But how many files will be written at a time will be decided at run time but, i know the maximum limit can be 15.
I am not getting how to create object of class FILE and then how to access them.
Can anybody help me in this.
Thanks in advance
|
|
|
|
|