HELP! "Exception Floating point inexact result" while processing WM_COPYDATA msg any clues

D

devendra pardeshi

hi friends/seniors

i am stuck on one problem in VB 6.0 and need solution. see if u can help me.

first i describe the problem.

Can u imagin the WinZip scenario. we right click on some file and select in
context menu add to zip.Now if

winzip is not runnig allready new instance of winzip application begins and
u add the file to whatever .zip file.

Now let the application be running and right click on some other file and
again select add to zip. and winZip

automatically detects the previous instance of application and adds ur file
to the last zip. This is exactily what

i need to de but in some other contexts. I am implementing backup system for
LAN/VPN where user can select

files of his interest and those will be added to backup list. I need to back
up these file dynamically as soon as

any of them changes. For this i have have written one activeX

exe component that watches (keeps spying) for any File Changes using
'FindFirstChangeNotification' for every file that

has been added by user to backUp List and as any change notification is
received this component raises event that i

catch in my main application and take back up for whatever file changes.

Now the client needs that if this application is running and user wants to
add some file he should be able to do that

by right clicking and selecting from context say "add to BackUp List". noe
at this if previous instance is running my

main application should stop the spying component and add new file to the
list and restart the spying with new list.

now i explain where things go wrong

my component is working fine. i can stop it anytime through my main
application add new file to list and restart it with

new list, this works fine if user do this through GUI of main application.
But if user tries to this through right click

context menu things go wrong. If previous instance is running then i have to
use subclassing for processing

WM_COPYDATA msg in my main application. The new instance of application just
detects the presence of previous

instance and then sends any command line parameter (the name of the file
that is right clicked) to it using 'SendMessage'

WIN32 api, and then just END itself . Now previous instance of the
application has to process the command line parameter

that is received on WM_COPYDATA msg. This processing works fine as long as
i'm doing any processing/accessing

on my main application's objects (like main GUI form/any modules). like for
refreshing the list view on main form, adding

file name to collection in module. all this is being done with that previous
instance. but the moment it tries to access the

activeX exe component (say for stopping it, rater any dammed access say any
simple property of that component) the

main application's instance crashes. the error that is returned is

"The Exception Floating-Point inexact result"

(Oxc000008f) occured in the application at location 0x77e8f142.

Click OK to terminet the program ....cancel to debug.

Please note that as long as my main application try to access the spy
component through any GUI initiated events this works

fine only when i'm sending msg to previous instance, then that instance is
crashing.

I'm stuck on this. i did all search on net, google and what have u. but no
avail. plz let me know if any of u can give me some

breakthrough. thanks

-deven
 
A

Armin Zingler

devendra pardeshi said:
i am stuck on one problem in VB 6.0 and need solution.

This is a VB.NET group (see group name). For older versions please turn to
one of the microsoft.public.vb.* groups.
 
H

Herfried K. Wagner [MVP]

Hello,

devendra pardeshi said:
i am stuck on one problem in VB 6.0 and need solution. see if u can help me.

first i describe the problem.

Can u imagin the WinZip scenario. we right click on some file and select in
context menu add to zip.Now if

winzip is not runnig allready new instance of winzip application begins and
u add the file to whatever .zip file.

Now let the application be running and right click on some other file and
again select add to zip. and winZip

automatically detects the previous instance of application and adds ur file
to the last zip. This is exactily what

i need to de but in some other contexts. I am implementing backup system for
LAN/VPN where user can select

files of his interest and those will be added to backup list. I need to back
up these file dynamically as soon as

any of them changes. For this i have have written one activeX

exe component that watches (keeps spying) for any File Changes using
'FindFirstChangeNotification' for every file that

has been added by user to backUp List and as any change notification is
received this component raises event that i

catch in my main application and take back up for whatever file changes.

Now the client needs that if this application is running and user wants to
add some file he should be able to do that

by right clicking and selecting from context say "add to BackUp List". noe
at this if previous instance is running my

main application should stop the spying component and add new file to the
list and restart the spying with new list.

now i explain where things go wrong

my component is working fine. i can stop it anytime through my main
application add new file to list and restart it with

new list, this works fine if user do this through GUI of main application.
But if user tries to this through right click

context menu things go wrong. If previous instance is running then i have to
use subclassing for processing

WM_COPYDATA msg in my main application. The new instance of application just
detects the presence of previous

instance and then sends any command line parameter (the name of the file
that is right clicked) to it using 'SendMessage'

WIN32 api, and then just END itself . Now previous instance of the
application has to process the command line parameter

that is received on WM_COPYDATA msg. This processing works fine as long as
i'm doing any processing/accessing

on my main application's objects (like main GUI form/any modules). like for
refreshing the list view on main form, adding

file name to collection in module. all this is being done with that previous
instance. but the moment it tries to access the

activeX exe component (say for stopping it, rater any dammed access say any
simple property of that component) the

main application's instance crashes. the error that is returned is

"The Exception Floating-Point inexact result"

(Oxc000008f) occured in the application at location 0x77e8f142.

Click OK to terminet the program ....cancel to debug.

Please note that as long as my main application try to access the spy
component through any GUI initiated events this works

fine only when i'm sending msg to previous instance, then that instance is
crashing.

I'm stuck on this. i did all search on net, google and what have u. but no
avail. plz let me know if any of u can give me some

Interesting line wrapping...

;-)

Regards,
Herfried K. Wagner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top