|
See MSDN for the docmentation.
your thread function should be a global or static function.
see the sample from MSDN.
it's using CreateTHread to create the threads. anyway AfxBeginThread internally calls CreateThread function. So don't worry...
Check the sample[^]
|
|
|
|
|
See Here[^] maybe it is some helpful to you
|
|
|
|
|
I want to copy files from a server to my computer. How do I have to write the path to the server. Suppose the server IP is 192.168.1.1, the path on the server is C:\temp
Should the source path look like this - 192.168.1.1\c:\temp\test.txt
Thanks!
modified 9-Mar-17 17:14pm.
|
|
|
|
|
it depends upon the application protocol u r using to fetch the file
never say die
|
|
|
|
|
I use TCP, I want to do the same thing windows explorer does when you copy files over the network.
modified 9-Mar-17 17:13pm.
|
|
|
|
|
|
u can use Wininet API
never say die
|
|
|
|
|
I have a database, and I would want to create a backup before I delete everything that's in it, but using VC++. So can I issue a comand(when the user clicks new, let's say) that will copy the databse from it's folder to a backup folder? Or what solution would you recommend?
|
|
|
|
|
Backup what kind of database? is it an ms access mdb file or an sql server mdf file or any other type of database?
Milton Kb
|
|
|
|
|
Milton KB wrote: Backup what kind of database? is it an ms access mdb file or an sql server mdf file or any other type of database?
I use sql server mdf.
|
|
|
|
|
u can use Sql DMO for backing up sql server db. its a time consuming process which varies depends on the size of the db to be copied. so its better to make the backup once and ync the backup with changes in the actual db in realtime.
cheers ..Milton KB
|
|
|
|
|
Hi to all
I want to transfer same A/D binary data from a microcontroller to PC, via USB. I have an API function call in C++, that initiates a USB IN transaction with the result the data (64bytes) from controller buffer to be transferred to a buffer in the PC. Because I want the flow of data to be constant I want to device a mechanism in C++, that would call automatically the API function witch initiates the IN transaction, every X milliseconds. I am thinking to use a timer that would produce an event with a constant period. Is this a good method? Anyone have any suggestions?
Thanks Nick
nick
|
|
|
|
|
is there any sample in code project wherein vc++ or c++ is used to consume iTunes SDK? is it necessary that iTunes should be installed in my machine to initialize iTunes SDK? or is it enuf if i have the required dlls registered in place?
vignesh
|
|
|
|
|
Hello everyone!
fwrite((const short*)VER_STR1, 2, 1, file);
VER_STR1 is a #define d constant, so I can't use & after the cast to const short* , and this is C, so I can't use reinterpret_cast<> either... How do I pass just a little 2-byte short to the function? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
if its something like
#define VER_STR1 12
Then in effect you have
fwrite((const short*)12, 2, 1, file);
Which means write the short value stored at memory location 12 which will never work. I dont think you can get the address of a literal.
You'll need something like
const short temp = VER_STR1;
fwrite(&temp, 2, 1, file);
Objects in mirror are closer than they appear
|
|
|
|
|
Oh, sorry for not having answered to this before... I kinda abandoned this project for a while... But thanks though, that worked!
Windows Calculator told me I will die at 28.
|
|
|
|
|
how to declare object for wrapper class in consol based application.
Is it the same :
classname object;
or some other way
2) If i want to design menu in consol based application is that possible?????
-- modified at 2:01 Tuesday 1st August, 2006
|
|
|
|
|
I don't see why it would be different, assuming you're using the same compiler and language...
priyanka s wrote: 2) If i want to design menu in consol based application is that possible?????
Nope, sorry... Unless you want to design your own menus out of characters, with pdcurses[^] or something...
-- modified at 2:12 Tuesday 1st August, 2006
Windows Calculator told me I will die at 28.
|
|
|
|
|
Can anybody please show me a way using VOIP in vc++ to send voice files on TCP/IP. Or a guide me to sample which users VOIP.
Thank you
KIRAN PINJARLA
|
|
|
|
|
how to delete a CStatic object present on the Client window? wt is the right function?
i have the following things with me:-
1) Pointer to the object
2) coordinates of the window/object
3) hWnd
-- modified at 1:12 Tuesday 1st August, 2006
|
|
|
|
|
Hi,
You can hide instead of deleting it using ShowWindow(SW_HIDE). Just a suggestion.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
SteamEngine wrote: delete a CStatic object
How did you create that CStatic object? (using new)
You can call DestroyWindow(),delete your pointer after this call.
delete myObj;
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You want to delete a cstatic object but what is it (2)
how to create Cstatic?Whats application type?
Is hWnd from CStatic
|
|
|
|
|
I think, u should learn the basics of C++
Jubin Almighty
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
Is it possible to read the data from a file to an object using ReadFile?
please guide me how to do the same.
I tried the following way in VC++ but not getting the values to the object members, getting junk values only. Please help.
class configdata
{
public:
char arr[10];
int value;
void printdata()
{
CString aa;
aa.Format("%d",value);
AfxMessageBox(aa);
return;
}
};
void CTestDlg::OnButton1()
{
DWORD dwBytesRead, dwBytesWritten, dwPos;
char buff[4096];
configdata ss;
HANDLE hAppend;
hAppend = CreateFile("c:\\TWO.TXT", GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (hAppend == INVALID_HANDLE_VALUE)
{
AfxMessageBox("Could not open TWO."); }
if (ReadFile(hAppend , &ss, 11, &dwBytesRead, NULL))
{
}
CString here;
here.Format("%d",ss.value);
AfxMessageBox(here);
buff[dwBytesRead] =0;
ss.printdata();
CloseHandle(hAppend);
}
|
|
|
|