|
so with in run(LPVOID p) instead of passing a pointer to CMainFrame and executing run() I should PostMessage to CMainFrame to run the run()? Then with in run() I can post a msg back to CMainFrame to run the UpdateTime() function?
hehe how weird..
|
|
|
|
|
Errr.... lol, well it is because you have function names that are not suitable for such communication
But yes, this is the preffered way. Of course you can use Events, mutexes, semaphores and another such tricks, but PostMessage is the easiest one. The point is that you can't use a pointer (class, whatever) from another thread to run functions from the second
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Ah, well, discard my previos post. I just paid attention that your "run" function is static, which has same meaning as global. So you should not use the pointer to CMainFrame to reach it, but: CMainFrame::run()
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Does anyone know of a line drawing function where I can specify the degrees the line should be drawn (i.e. - 0 to 360 degrees). I am also looking for a function to export this line as an image and save it to a file. Any help would be great. Thanks.
Nick Parker
Actually, real programmers don't need the enter key- they just type in 00001101."
|
|
|
|
|
I believe you should be able to use just sine and cosine calculations to figure this out and use LineTo etc to draw the lines.
|
|
|
|
|
Is it the same way you do when exporting functions from a DLL when exporting a function from an EXE??
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
As I remember it is the same way. And same way you are exporting them. I did such thing about 2 years ago, using DEF file ,not __declspec . So not sure if you can export/import classes in exe. But LoadLibrary and all that stuff is working fine
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Philip Patrick wrote:
So not sure if you can export/import classes in exe
But I can export functions as you said!
Thanks!
ps. this is my 400th message!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Rickard Andersson wrote:
this is my 400th message!
Congratulations!
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
congrats
|
|
|
|
|
How can I make my app check if there is any current transfer??
I mean, if the internet connection is on and nobody is sitting and surfing I want the modem to disconnect. But how will I know if there is any transfer?
I hope you understand me!! Please ask me if you don't!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Isn't there already a "Disconnect timeout" in some of the RAS dialogs? If you can't find it, surely your modem has this ability. Read up on it's AT command set.
|
|
|
|
|
Mike Nordell wrote:
Disconnect timeout
ooh.. I will check that out!
Thank you!
Mike Nordell wrote:
surely your modem has this abil
But how do I put my modem in to the Visual Studio IDE!?!?!!?
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
But how do I put my modem in to the Visual Studio IDE!?!?!!?
That is of course completely impossible, but it does display you want to set the timeout programmatically.
The easiest way I can come to think of is to open the com port the modem is connected to and send it the "set timeout" AT command (it might be ATS3, but don't take my word for it since it's over ten years since I last played with it - insetad do that read-up on your modems AT command set).
|
|
|
|
|
I think u can't.
One solution (of many) I use on Linux, don't know if it works on Windows: Don't requery or perform internet access to often in your application, let a timeout a chance to happen and terminate then internet access. Then you can check in your application if there is still internet access, and only if there is make access to the internet. LAN access is always fine though.
Some PCs can't check on there own if they are online: The inet access is via a router (instead of a local ISP connection), so it gets hard. For that case I gave my application a command line option to trigger online/offline... but well, the user has to trigger that on his own. Well, users are stupid, let teh sysadmins do the work...
Some emailchecker or messanger might cause high internet costs still, because ´the computer is online endless....
|
|
|
|
|
Is there a way to block all internet acces on a computer??
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
do you mean write a program that when its running it blocks all access? wouldn't it be easier to just put permissions on the proxy to keep certain users from accessing the net?
-dz
|
|
|
|
|
Hmm.. I want no program to acces the internet at all or user... so. what do you mean with the proxy thing!?
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
well it all depends on how the user has access to the net. If you are at an office with a network connection then their internet access is routed through a proxy (a computer which connects to the T1 and disperses the connection to all the other computers).
I think we may be confused here, what does this have to do with coding, and what are the specifics of the network?
the easiest way to keep someone from getting on the net is to unplug their network connection
-dz
|
|
|
|
|
Well it sounds like an useless app that I'm doing!
I don't want my "self connecting apps" that want to check for updates to check for their updates.. and then I want to block the internet access so they don't...
And some more reasons for why I'm ask for this...
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
ZoneAlarm may be what you're looking for. www.zonelabs.com.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Yes!
But I want to do it myself.. in my app...
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Rickard Andersson wrote:
Is there a way to block all internet acces on a computer??
You can add a rule at the firewall to deny all packets to/from that machine's IP address
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Yes but I want to do it in my app!
Hooow!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
I guess that would require you to listen to every single request going through port 80 (assuming they check for updates through the http port), determine if the request is for an IP you don't want, and if so somehow blocking it.. i don't have a clue about how to do this at all so ill shut up now
the easiest thing would be just to install some IP sniffing software and look to see what IP address the software is trying to access.. then install a firewall and block access to that IP.. like nish said.
good luck in whatever your trying to do
-dz
|
|
|
|