|
Albert Pascual wrote:
Yeah! Do you think is going to work?
I hope so. I would be interested in an MC++ forum too.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
hi,
i'm writing a chat App and want people see eachother when they request user picture (.jpg, bmp..etc) from server. i both write server and client side.
1-Do i able to keep the picture of users in Access Database using CDAO MFC classes? or classes of DAO SDK
2-Do i able to retrive and send people again using MFC if so how?
3-Should i need to serialize the picture and send it as if it is a document in binary?
4-How should i think Uploading images of new users?
5-Any better idea of handling images and sending retrieving them on network?
Thanks for ur help,
Atilla Selem
listening to you...
|
|
|
|
|
The easiest way is to send the jpg file from the client every times that sends a message to the server.
If the bandwith is not a problem! So you don't have to keep a DB in the server side.
That's just an idea of course!
Cheers
Al
|
|
|
|
|
how will i do that?
using serialization?
but think that you should keep all the user pictures as a server since u should succeed to send any one of the user's pic to others who request.
or by somehow if u don't want to take responsibility of that you have to contact users to users and make them send pictures to eachother. But they should not be aware of that.
i am at that corner of my App and i really think the easiest and efficient way to code.
Bandwidth is not problem.
But keeping things working is much diffucult.
Thanks for all
Atilla Selem
willing to learn and teach
|
|
|
|
|
I don't know your application so I just may be talking bollocks! However if your app is:
Server listens in a socket, clients send messages to that socket, server distributes message to all the connected clients.
Then when the client application starts, opens a photo.jpg and attaches that file at ever single message going to the server, the server doesn't need to change as it distributes the message and picture together to all connected sockets (clients)
If you don't want the user to have to worry about the photo.jpg, in the server you could add all the pictures with username.jpg, when a username connects without a pictures, just push it to that user!
Good way to distribute new pictures!
Well, that's my idea, however I don't know how did you designed the APP, maybe I am far off your design and to do that will take major changes in the code. Therefor, please ignore this message
Hope this helps
Al
|
|
|
|
|
Atilla:
Use this
Use the functions CADORecordset::GetChunk and CADORecordset::SetChunk
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Uploaded pictures would need to be stored in a binary large object field (BLOB). In SQL these are know as varBinary, in Access it is of the Type OLE.
From an ADO point of view, you would use the AppendChunk and GetChunck calls (I think) to pull and put data in.
Hope this help,
Giles
|
|
|
|
|
Is there a way to find which directory the program you are running is located with a simple call? That is when I run a particular exe, can I find which directory the user put this exe in?
I tried _getcwd etc but it does not seems to work for me.
Thanks in advance.
|
|
|
|
|
GetCurrentDirectory
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Call GetModuleFileName(...)
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
No.
You have to get the HMODULE/HINSTANCE of the module (check the virtual memory API) and then qury that one, so it's two API functions to call.
If you however do implement it in a function, it can become just one function to call.
|
|
|
|
|
Thanks for the hint.
By any chance, do you know what the calls are exactly? How do I get the HModule etc?
THanks.
|
|
|
|
|
Here's how:
void getAppDir
(char* szAppDir)
{
::GetModuleFileName (AfxGetInstanceHandle(), szAppDir, _MAX_PATH);
char* pPeriod = strrchr (szAppDir, '.');
if (pPeriod != NULL) {
*pPeriod = '\0';
}
} /ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
Why won't a simple GetCurrentDirectory Work
|
|
|
|
|
It will return the current directory (the one to which you've CD'd), which may not be the same as that of the app.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
I'd like to find a report component/library that has a redistributable
report designer.
In principle, Crystal Reports would be fine, except we can't redistribute
the designer, meaning our customers would have to fork out an extra £144
(~$225) to buy Crystal Reports standard themselves (no chance whatsoever -
our software is only going to cost £100-200).
So, I'm desperately trying to find a report designer we can distribute! As
long as it can put graphics and fields on a page, and we can insert data
into it, we don't need much else. Due to the short dev time of the project
I'd really prefer not to have to write a report designer in-house.
Any help very much appreciated.
Paul.
|
|
|
|
|
Paul,
I could almost write a book on this topic, I know that I have commented on this subject here before with others. Everytime I read a question like this I feel the need to vent. We ran into the same situation too, looked at the price of Crystal Reports which we have with some of our apps, but the application that I was going to be working on was going to require so many licenses that it wasn't cost effective to use Crystal anymore. We looked and played with several different components however we ended up buying Active Reports from Data Dynamics. This program allows you to import prexisting Crystal or Access report and loads of other options. Here's the kicker, it comes with a royalty free end-user designer control.
HTH
Nick Parker
|
|
|
|
|
Hi Nick,
That sounds interesting..
How well does it integrate with VC++?
Paul.
|
|
|
|
|
I know when you download the fully functional evaluation version which is available at....here Data Dynamic Downloads there are samples in many different languages, C++ being one of them. We used it for an intranet project that invloved a lot of asp and seemed to intergrate rather well. Let me know.
HTH
Nick Parker
|
|
|
|
|
I'm downloading that now, thanks.
We're also looking at Component One's (www.componentone.com) VSView Reporting Edition component and discussing the cost of royalties for distributing their designer.
If you're interested in which we end up choosing, let me know and I'll keep you informed.
Thanks again,
Paul.
|
|
|
|
|
I am, we actually looked at Component One's VSView first, however we wanted the ability to call stored procedures to return our recordset to the report and found that we were unable to do this through VSView. My boss and I called the tech support line and also sent an e-mail in to their department and all we got was a lot of red tape from some service rep who said "...the documentation I have says that it can be done, unfortunately I am not able to locate anyone here who has actually tried or confirmed that..." Without the ability to call stored procedures we felt the ability to expand with VSView was nill. Just out of curiosity let me know what you end up deciding.
Nick Parker
|
|
|
|
|
This is a C question.
I have the following for loop in my program:
for(double i=0.0; i<360.0; i+=3.0/10.0)
{
//do stuff
}
everything works fine, but I changed it to this because I need to generalize the code later on:
double angle=3.0/10.0;
for(double i=0.0; i<360.0; i+=angle)
{
//do stuff
}
and now the program crashes when I run it. I don't see the difference between either of those two. And "no" there is nothing complicated in the for loop such as changing the value of angle part way through while I'm running through the loop. So what is going on here????????
|
|
|
|
|
I tried it and didn't see any crash!
double angle=3.0/10.0;<br />
for(double i=0.0; i<360.0; i+=angle)<br />
{<br />
TRACE1("%f", i);<br />
}
Look at the reason of the error, it is an exception error?
did you pass some invalid value to a math function (most of them will
return NaN value)?
The other thing I can say, debug (F9, F10, F11).
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|
|
A significative difference is that in the latter case, the increment value is stored in the stack (at least in debug mode), while in the former it is a constant value directly fed to the ADD assembly instruction. So, I'd bet for your program somehow corrupting he stack (maybe writing out of bonds of some array?)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
So how do I deal with something like that?
|
|
|
|