|
-
Mar 1st, 2001, 07:17 PM
#1
Thread Starter
Addicted Member
Hi,
Is there a problem using the SetTimer API in an NT4.0 environment? I have some code that works fine on ME, but when try it on NT I get an memory error. Is there some "tweek" I can do to it to make it work?
Thanks
wolf
-
Mar 2nd, 2001, 05:32 AM
#2
Fanatic Member
Post some code, SetTimer should work fine under NT4....
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Mar 2nd, 2001, 02:42 PM
#3
Thread Starter
Addicted Member
Hi,
Thanks for trying to help me. This exact code will run in the VB IDE under ME, but not under NT. I get a VB6.exe application error that says, The instruction at 0x0012fe99 referenced memory at 0x0fc00fdc. The memory could not be written. This doesn’t mean much to me; maybe you will have a better idea about its interpretation.
Another note: It appears to blow up at the settimer line in the BackGround Sub.
This is in a standard module in an active X exe
Option Explicit
Public Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Public Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Private lTimer As Long
Private cCollator As Collator
Public Sub CallBackClass(lpCollator As Collator)
If lpCollator Is Nothing Then Exit Sub
Set cCollator = lpCollator
End Sub
Public Sub BackGround()
lTimer = SetTimer(0, 0, 100, AddressOf BackOperation)
End Sub
Public Sub BackOperation()
Call KillTimer(0, lTimer)
lTimer = 0
cCollator.CommenceJob
Set cCollator = Nothing
End Sub
Do you think limited access rights maybe effecting this?
Thanks for your help!!!
-
Mar 4th, 2001, 01:57 AM
#4
Thread Starter
Addicted Member
y
I got around the problem by using a timer, but the API just wouldn't work. Does anyone have any ideas as to why? I'm just lookin for a push in the right direction. My experience on NT is limited.
Thanks
That which does not kill us, only makes us stronger. 
-
Mar 4th, 2001, 02:12 AM
#5
Settimer error
HI
Funnily I also get the same error message. But the memory addresses are different and I am using Win 2000
This is the message I get.
The instruction at "0x0fc00f1e" referenced memory at "0x00000010". The memory could not be "written".
-
Mar 4th, 2001, 12:16 PM
#6
Thread Starter
Addicted Member
Thanks for the responce. At least I know I'm not the only one with this problem. Unless, you were just helping me test the code I posted. Anyway, I got around the problem; I was just curious about whether the API worked on NT or not.
Thanks for the help.
That which does not kill us, only makes us stronger. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|