|
I want to store an object to file using one program and then access that object using a different program which knows nothing about the object only that it can be accessed using a set of agreed interface methods.
I have noticed that when I stream an object to file only the data is stored and not the methods. This is of no great supprise to me, only that I have a book which says otherwise!
Can anyone point me in the right direction please.
Many thanks.
|
|
|
|
|
Which book?
Sounds like what you need is the object to be COM, and use an IPersistXXXX type interface.
Steve S
|
|
|
|
|
The book: The Object Oriented Thought Process by Matt Weisfeld.
It may be that I have just mis-interprited what I read !
Thanks for your help.
|
|
|
|
|
Hi Dears
I've created an Exchange 2000 Store Event Sink in Visual C++ using
______________________________________________________
http://support.microsoft.com/default.aspx?scid=kb;en-us;288156
------------------------------------------------------
I've also created a COM+ Event Sink Application usin
________________________________________________________
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/wsst_create_a_com_event_sink_application.asp
--------------------------------------------------------
Now I have to register my "Event Sink"
There is some guidance on thr URL
___________________________________________________
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/wsst_registering_an_event_sink.asp
---------------------------------------------------
But I think it's for Visual Basic not for Visual C++ implementation
Please help me...................
I'll be very grateful to you.
Kind Regards
Atif
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
1.I automated word and excel. But I dont know whedther it is opened yet. Because it maybe have got a password. Can you help me please.
2. I knew the password of office file. If I automate to open it. If password is incorrect I don't like to seed fail message from application. How to solve this problem?
Thanks
Jason Chang
tmsnhien@yahoo.com
|
|
|
|
|
Hi,
i have a MFC Dialog, which has a CPropertySheet with 3 CPropertyPages included!
The first page owns one tree Control, two static fields, one button, and one radiobutton;
The second page owns one button and one edit field
The third page owns one RichEdit field
If i click on the 3rd PropertyPage it disappears and after that the whole dialog isn't able to redraw his content, so i have to kill the process via task manager!
Has someone an idea ?
Thanks ?
|
|
|
|
|
i think u have not added teh function
Coinitialize (NULL);
Try calling this function in the constructor of the third proppage and do call counintialize in the destructor
try this out
Thanx
TAKE CARE
|
|
|
|
|
You're right, i don't have added CoInitialize() ! I have tried it but that wasn't the problem. I have found out that there is a problem with the RichEdit Field, if i delete the RichEdit field and but nothing or something else instead of it, i seams to work, the question is WHY?
thanks
|
|
|
|
|
R.T.F.M makes sense!
Shame on me!!
Here's the solution: I forgot to call BOOL AFXAPI AfxInitRichEdit( ); !!!
Greetings,
hph
|
|
|
|
|
WindowsInstaller -why so considered good?
that some install- makers already not include possibility to create exe files...?
this is strong -
Wise installer 5.1
Does this is true?
(can not make exe by Wise)
thanks.
|
|
|
|
|
vgrigor wrote:
WindowsInstaller -why so considered good?
"Good" is in the eye of the beholder. If you like Microsoft products, then you'll probably like WindowsInstaller. If you don't like Microsoft products, then you'll probably not like WindowsInstaller, regardless of its merits.
vgrigor wrote:
that some install- makers already not include possibility to create exe files...?
Not sure what you are saying here.
vgrigor wrote:
this is strong -
Wise installer 5.1
Does this is true?
(can not make exe by Wise)
Yes, WISE is a good program, and has always created a self-extracting EXE.
|
|
|
|
|
Sorry I downloaded
"Wise for Windows Installer" -
it is even called so
but
"Wise for Visual Studio .NET is the industry's first .MSI installation authoring solution integrated directly into Visual Studio .NET. Wise for Visual Studio .NET includes everything professional developers need to create .MSI installations, and the tight integration offers the substantial advantage of streamlined installation authoring and better installation quality.
"
In it's wizard I can not create exe.
May by you meant another their product?
Or how to from "Wise for Windows Installer" create exe?
Thanks you for response.
|
|
|
|
|
vgrigor wrote:
May by you meant another their product?
Correct. I have not used their product in almost three years.
vgrigor wrote:
Or how to from "Wise for Windows Installer" create exe?
Just "compile" it. The output is an EXE file.
|
|
|
|
|
Target option is "msi package"
I doubt that it would create exe.
...
|
|
|
|
|
Hi everyone,
First off i would like to say this site is great, especially for a 15 year old that is trying to learn VC++ on his own.
I want to send a hex number to the screen, but don't know how. What data type should it be, and how would i represent a hex number.
For example I want to send something like 5FF00231 which would be an 4 byte number. I don't know how though, would it be an int, a string?
Please help...thank you so much
|
|
|
|
|
Do you just want to display "5FF00231" on the screen??? If so just send it as a normal string.
Regards,
Brian Dela
IE 6 required: http://www.briandela.com[^] It works now.
|
|
|
|
|
So is your question about converting base X numbers to base 16, or displaying text to the screen?
If the former, try:
int number = 1609564721;<br />
char str[16];<br />
sprintf(str, "%#x", number);
If the latter, try:
printf("%s\n", str);
or
cout << str << endl;
|
|
|
|
|
My friends dad gave me a program to write cause he said it will make me learn.
I have to connect to a server and send it 4 byte messages that have the form of 5FF00239. The message changes though, because the window (dialog i think its called) has 2 check boxes. If only the first check box is checked then the message should be 5FF00239 and if the second check box is only check it should be 5FF0023A. But if both are checked then he wants the message to be 5FF0023B.
How do I make these messages? I don't know what type they should be. I can do everything else he wants except i don't know how to do the message. I thought it would be a string, but he says if it is, then the message is 8 bytes instead of 4?
Please help me...
|
|
|
|
|
Ok, numbers are treated differently when sending them versus displaying them. When you talk about a "hex number," that is for display purposes only. In other words, 1609564729 and 0x5FF00239 are treated identically by the computer. It stores them as binary regardless of how you use them. Now if you are sending "1609564729" and "0x5FF00239" (notice the quotes) to some other process/computer, then they are two totally different things.
So, whether you send 1609564729 or 0x5FF00239 to the server, it makes no difference.
What mechanism are you using to send data to the server?
|
|
|
|
|
Hi,
thanks for helping me.
mechanism? I want to use the int send command. Is that what you are talking about.
So you are saying that I can use a int variable, but just put 0x in front of the number?
|
|
|
|
|
Bingo!!
These three code snippets are the same:
int num = 123456789; // base-10
SendToServer(num);
int num = 0x75BCD15; // base-16
SendToServer(num);
int num = 0726746425; // base-8
SendToServer(num);
|
|
|
|
|
For the send command, i have problems
it needs the socket and a message and a length, and some flags. Its says I can't use int because the message has to be const char *. for the length is that in bytes? should it be 4 or 10 to represent all numbers/letters?
Jimmy
Just cause I am 15, doesn't mean I'm dumb! (I'll really be 4 on Feb. 29...the year 2004)
|
|
|
|
|
How about a code snippet of what you are trying to do?
|
|
|
|
|
hi,
here is what i want to do, the program is connected to the server already. (I don't know how to connect, i just use my friends dad program to connect)
int message;
message = 0x5FF0023A;
send(s, message, strlen(message), 0);
It says send can't convert parameter 2 from int to const char *
and it says the same thing about strlen.
Jimmy
Just cause I am 15, doesn't mean I'm dumb! (I'll really be 4 on Feb. 29...the year 2004)
|
|
|
|
|
NewHSKid wrote:
the program is connected to the server already. (I don't know how to connect, i just use my friends dad program to connect)
Does that mean he is supplying you with a valid socket descriptor?
Given that the second parameter of send() is expecting a char* , you'll need:
int nMessage = 0x5FF0023A;
char szMessage[9];
sprintf(szMessage, "%d", nMessage);
int nBytes = send(s, szMessage, lstrlen(szMessage), 0);
|
|
|
|