|
in C++, the default struct assignment operator does a member-wise assignment from src to dest. and vector's default assignment operator will copy the contents of the src vector to the dest, automatically.
so, no, you shouldn't have to do any push_backs.
|
|
|
|
|
i dont know how to implement polynomial addition with array pls guide me
Beulah
|
|
|
|
|
I've just googled your "question" and found a few implementations.
Since I'm no expert on polynomial additions, I cannot say if they are good or not.
Have fun looking at them and adapt them to your particular situation.
This signature was proudly tested on animals.
|
|
|
|
|
Hi,
I have written an application to get notified when any event is written to Application Log.When the code notifies I collect the recently written events and put them in a text file. ( I have reffered the http://msdn.microsoft.com/en-us/library/aa363677(VS.85).aspxto develop this application)
But when Application log is full the code is still waiting for an event to occur and never notifies.
The question is that whether the NotifyChangeEventLog() function notifies if an Application Log is full.
Is this the default behaviur of the notifyChangeEventlog() function?.If it is so is there any thing that I can do to handle this situation.
Please help me in solving this.
Thanks in advance
ARD
|
|
|
|
|
Raghu.Amil wrote: But when Application log is full the code is still waiting for an event to occur and never notifies.
The question is that whether the NotifyChangeEventLog() function notifies if an Application Log is full.
Per MSDN:
The NotifyChangeEventLog function enables an application to receive notification when an event is written to the specified event logfile.
Since nothing has been written, I guess not.
"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
|
|
|
|
|
Hey Friends
I have a setup which copies some files and registers few com dlls and i have a network where i wish to install my application.
Now is there any automatic way of doing so or i have to run the setup on all computers indivually?
Regards
|
|
|
|
|
Excuse any ignorance im just a lowely .NET programmer and have very little c++ experience
So i'm trying to disect vssver2.scc files for forensic purposes (don't ask ) and have found some information. mainly from here: http://alinconstantin.dtdns.net/WebDocs/SCC/VssVerScc.htm[^]
Towards the bottom of this page it gives some hint as to the structure of this file:
A vssver.scc file is composed of 3 sections:
* a FileHeader section of 32 bytes size
struct FileHeader
{
DWORD dwSignature;
BYTE[16] arrDatabaseGuid;
DWORD dwChecksum;
DWORD dwProjectID;
DWORD dwFileEntries;
}
* a number of FileEntry sections, each of them 16 bytes, one entry per each file tracked by the vssver2.scc file
struct FileEntry
{
DWORD dwFileID;
DWORD dwFileChecksum;
DWORD dwFileTimestamp;
DWORD dwFileVersion;
}
* a FileNames section in the end of the file that contains
o The null-terminated project name associated with this vssver2.scc file
o A list of null-terminated file names that have entries in the FileEntry section
I have writeen a small c# app to read this information and I just wanted to check a few things.
1) is a DWORD is akin to a uint in .NET? In code using a BinaryReader I have uint myint = BitConverter.ToUInt32(reader.ReadBytes(4) ,0); - does that look right?
2) I was assuming that the field dwFileTimestamp would be a c++ time_t so I had the code DateTime dt = new DateTime(1970,1,1).AddSeconds(dwFileTimestamp); but this does not produce expected results (dates all over the place from 2064 to 2001). Question is, is there any other usual way that dates/times are stored in c++ ? any weird ones that are not really used any more? Any ideas?
TIA
|
|
|
|
|
Hi Jamie,
J4amieC wrote: 1) is a DWORD is akin to a uint in .NET? In code using a BinaryReader I have uint myint = BitConverter.ToUInt32(reader.ReadBytes(4) ,0); - does that look right?
DWORD is an unsigned long .
J4amieC wrote: 2) I was assuming that the field dwFileTimestamp would be a c++ time_t so I had the code DateTime dt = new DateTime(1970,1,1).AddSeconds(dwFileTimestamp); but this does not produce expected results (dates all over the place from 2064 to 2001). Question is, is there any other usual way that dates/times are stored in c++ ? any weird ones that are not really used any more? Any ideas?
Is there a way you could reverse-store the values (tell what would be stored in the file in the DWORD field for a given date)? Or, can you give me an example of the value in the file and the value that you expect? (Or you just have values in the file and don't know what it may correspond to?)
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks for your answer Rajesh, sorry its taken me a while to respond I posted this before leaving work last night.
Rajesh R Subramanian wrote: DWORD is an unsigned long.
In which case wouldnt it need 8 bytes? The documentation I posted said that the DWORD was 4 bytes and certainly BitConverter.ToUInt64() is looking for 8 bytes.
Rajesh R Subramanian wrote: Is there a way you could reverse-store the values (tell what would be stored in the file in the DWORD field for a given date)
Im trying that, but unfortunately dont have VSS2005 here so im relying on someone in another contry to do this for me. (Again, don't ask )
Rajesh R Subramanian wrote: Or, can you give me an example of the value in the file and the value that you expect
I have a value 270107399 (albeit gotten as a uint not a ulong) which I would expect relates to around Jan/Feb 2006 - however using this number as seconds since 1970-01-01 I get the date as 24/7/78 05:49 :S
|
|
|
|
|
You're welcome, Jamie.
J4amieC wrote: In which case wouldnt it need 8 bytes? The documentation I posted said that the DWORD was 4 bytes and certainly BitConverter.ToUInt64() is looking for 8 bytes.
I'm not sure then why would it be a DWORD . But I'm sure a DWORD is an unsigned long (consult with Windef.h )
J4amieC wrote: Im trying that, but unfortunately dont have VSS2005 here so im relying on someone in another contry to do this for me.
Did this happen? What were the results?
J4amieC wrote: I have a value 270107399
With 270107399, I as well am able to get 24 Jul 1978 only.
Sorry, I'm not able to be much helpful here with this issue.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I use the follwing codes to Open & Detect the Serial port, but even I can detect the port not avalbale & show the message ... the "Comport error" dialog keepping shown before execute my error message
DCB comPort;
hPort = CreateFile (COM,
GENERIC_READ | GENERIC_WRITE
0,
NULL,
OPEN_EXISTING,
0,
NULL);
comPort.DCBlength = sizeof (DCB);
if(!GetCommState (hPort, &comPort))
{
CloseHandle(hPort);
CString str;
str.Format("Can not connect to Serial %s, please verify & SUBMIT over!", COM);
AfxMessageBox (str);
}
Is there any code to disable the Comport error dialog?
Thanks to any help
|
|
|
|
|
Hello,
I was wondering if it is possible to specify an OUTgoing port in a UDP connection.
I already created and used a connection
SOCKET m_oUDPSocket;
SOCKADDR_IN m_oUDPAddress;
.
.
.
m_oUDPSocket = socket(AF_INET,SOCK_DGRAM,0);
memset(&m_oUDPAddress,0,sizeof(SOCKADDR_IN));
m_oUDPAddress.sin_family=AF_INET;
m_oUDPAddress.sin_port=htons(m_iClientPort);
m_oUDPAddress.sin_addr.s_addr=inet_addr(m_sClientIP.data());
.
.
.
int rc=sendto(m_oUDPSocket,(char*)packet,size+12,0,(SOCKADDR*)&m_oUDPAddress,sizeof(SOCKADDR_IN));
If I now wanted to make sure that my data is always sent FROM a certain port, how owuld I do that? Or how can I get the port from which it is actually sending (or has sent)?
Regards
Souldrift
|
|
|
|
|
|
Hi,
Any api to delete a directory .This directory is on a network machine.
Thanks..
|
|
|
|
|
|
This api would delete an empty directory. I want to delete a directory with files in it.
|
|
|
|
|
At the bottom of the link I provided to you, this is specified:
To recursively delete the files in a directory, use the SHFileOperation function.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
In Onpaint of Header im trying as follows..
CHeaderCtrl* pHeader = GetHeader();
int nCount = pHeader->GetItemCount();
int nItem = nCount;
CDC dcMem;
HDC hDC =dcMem.GetSafeHdc();
HDITEM hdi;
while(nItem--)
{
pHeader->GetItemRect(nItem, rItem);
::GetTextExtentPoint(hDC,sText,sText.GetLength(),&size);
hdi.cxy=size.cx;
pHeader->SetItem(nItem,&hdi);
}
but the item of the headerCtrl is not increased
|
|
|
|
|
CListBox and CListCtrl both have a method called SetColumnWidth .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
|
Where are you stuck in implementing?
|
|
|
|
|
i want to communicate to the multimeter through rs232, for that i make one dialog (GUI in vc++) in which port configuration is there and read and write button is also there , means when click on read then if proble of multimeter is connected to AC supply then it will show AC supply value on the dialog.
|
|
|
|
|
The Concept is okay!!!
Is your multimeter is providing you an RS-232 interface for tapping the output??
or
you are doing it with any external ADC??? what data you have to communicate to the serial port?
a better explanation about your project may be much helpful in helping you!!!!
Have a Happy Coding.....
|
|
|
|
|
my multimeter have rs232 interface, i want code for communicate thru serial port, like read/write/close/open function, i m new in the vc++. so i want code for dialog based application.
|
|
|
|