|
You do realise that by only using the low-order DWORD in SetFilePointer, you're limited to the first 2GB of the disk, I presume? What offset are you feeding to SetFilePointer?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have tried offset as LARGE_INTEGER alsooo.....but same error...
|
|
|
|
|
Passing the low and high words separately as specified by the documentation? You can't just pass a LARGE_INTEGER or LARGE_INTEGER pointer.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
DWORD dwPtr1=SetFilePointer(hDevice1,
li_offset2.LowPart,
&li_offset2.HighPart,
FILE_BEGIN);
if (dwPtr1 == INVALID_SET_FILE_POINTER)
{
printf("\n\nSetFilePointer Failed to write,Err No:%d\n",GetLastError());
return 0;
}
|
|
|
|
|
Have you actually checked what the value is that you're passing to it? It's entirely possible that SetFilePointer isn't lying and that you are passing a negative number to it?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank uu..
thank uu
thank uu
I was passing -ve value.........
Mr.Stuart Dootson
U are really great......
--------------
Thanking you
--------------
|
|
|
|
|
Hai
I've been under a great prob.. since 2 days...
Issue is :
I've built a C#dll which is accessed from VC++(win32 console dll app)..
I've created a Java program to access the dll of the said C++ program...
I was successful in getting it worked ...
Problem comes when I run the same application in a different system where all the
needed visual studio files are installed...
From java i can access the C++ dll but the error comes in accessing C# dll(through the C++ program)...
NB: error accurs only when it is run on a different machine...
Error is:
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (0xe06d7363), pid=4024, tid=4028
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b01 mixed mode, sharing)
# Problematic frame:
# C [kernel32.dll+0x1eb33]
#
# An error report file with more information is saved as hs_err_pid4024.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
i've done "googling" with this error... but no one has come up with some satisfactory answer...
Pls do help.....
Thanks in advance ...
Santo
|
|
|
|
|
what is in the hs_err_pid4024.log.
Maybe on the machine isnt the approbiate (and bloated ) .net-Framework installed.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Thanks for ur reply
I dnt think the problem is with the installation of .net framework..
coz... same application works fine when the C++ project is complied/build
there..
this is the log file...
--------------- T H R E A D ---------------
Current thread (0x000360a0): JavaThread "main" [_thread_in_native, id=4028]
siginfo: ExceptionCode=0xe06d7363, ExceptionInformation=0x19930520 0x0007fa2c 0x10011a4c
Registers:
EAX=0x0007f98c, EBX=0x26a745f8, ECX=0x00000000, EDX=0x00000003
ESP=0x0007f988, EBP=0x0007f9dc, ESI=0x0007fa1c, EDI=0x0007fa1c
EIP=0x7c81eb33, EFLAGS=0x00000206
Top of Stack: (sp=0x0007f988)
0x0007f988: 102d8f88 e06d7363 00000001 00000000
0x0007f998: 7c81eb33 00000003 19930520 0007fa2c
0x0007f9a8: 10011a4c 00000000 00000017 00000000
0x0007f9b8: 00000001 00000000 0007fa10 00000000
0x0007f9c8: 0007f9ec 77525fcf 10006684 00000000
0x0007f9d8: 00000017 0007fa1c 10243990 e06d7363
0x0007f9e8: 00000001 00000003 0007fa10 000360a0
0x0007f9f8: 26a745f8 e06d7363 00000001 00000000
Instructions: (pc=0x7c81eb33)
0x7c81eb23: 8d 7d c4 f3 a5 5f 8d 45 b0 50 ff 15 04 15 80 7c
0x7c81eb33: 5e c9 c2 10 00 85 ff 0f 8e e6 d0 fe ff 8b 55 fc
Stack: [0x00040000,0x00080000), sp=0x0007f988, free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [kernel32.dll+0x1eb33]
C [MSVCR80D.dll+0x43990]
C [test_latestDllCpp.dll+0x4346]
C [test_latestDllCpp.dll+0x415f]
C [test_latestDllCpp.dll+0x16d1]
C [test_latestDllCpp.dll+0x162a]
j testjava.inDll1()V+0
j testjava.main([Ljava/lang/String;)V+17
v ~StubRoutines::call_stub
V [jvm.dll+0x86e84]
V [jvm.dll+0xddead]
V [jvm.dll+0x86d55]
V [jvm.dll+0x8dda7]
C [java.exe+0x14c5]
C [java.exe+0x69cd]
C [kernel32.dll+0x16d4f]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j testjava.inDll1()V+0
j testjava.main([Ljava/lang/String;)V+17
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00a70fe0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1948]
0x00a6fc58 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4044]
0x00a6ef30 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4048]
0x0003ee40 JavaThread "Finalizer" daemon [_thread_blocked, id=4040]
0x00a432e8 JavaThread "Reference Handler" daemon [_thread_blocked, id=4036]
=>0x000360a0 JavaThread "main" [_thread_in_native, id=4028]
Other Threads:
0x00a40930 VMThread [id=4032]
0x00a72330 WatcherThread [id=3148]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 156K [0x22a70000, 0x22b10000, 0x22f50000)
eden space 512K, 30% used [0x22a70000, 0x22a972d8, 0x22af0000)
from space 64K, 0% used [0x22af0000, 0x22af0000, 0x22b00000)
to space 64K, 0% used [0x22b00000, 0x22b00000, 0x22b10000)
tenured generation total 1408K, used 0K [0x22f50000, 0x230b0000, 0x26a70000)
the space 1408K, 0% used [0x22f50000, 0x22f50000, 0x22f50200, 0x230b0000)
compacting perm gen total 8192K, used 18K [0x26a70000, 0x27270000, 0x2aa70000)
the space 8192K, 0% used [0x26a70000, 0x26a74970, 0x26a74a00, 0x27270000)
ro space 8192K, 63% used [0x2aa70000, 0x2af7d860, 0x2af7da00, 0x2b270000)
rw space 12288K, 46% used [0x2b270000, 0x2b810728, 0x2b810800, 0x2be70000)
Dynamic libraries:
0x00400000 - 0x0040d000 C:\WINDOWS\system32\java.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d6c0000 - 0x6d85b000 C:\Program Files\Java\jre1.5.0_09\bin\client\jvm.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre1.5.0_09\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d690000 - 0x6d69c000 C:\Program Files\Java\jre1.5.0_09\bin\verify.dll
0x6d300000 - 0x6d31d000 C:\Program Files\Java\jre1.5.0_09\bin\java.dll
0x6d6b0000 - 0x6d6bf000 C:\Program Files\Java\jre1.5.0_09\bin\zip.dll
0x10000000 - 0x10016000 D:\java_dll\test_latestDllCpp.dll
0x79000000 - 0x79046000 C:\WINDOWS\system32\mscoree.dll
0x774e0000 - 0x7761c000 C:\WINDOWS\system32\ole32.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x10200000 - 0x10320000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\MSVCR80D.dll
0x02cb0000 - 0x02db2000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll
0x10480000 - 0x1057c000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\MSVCP80D.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x76fd0000 - 0x7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x20000000 - 0x202c5000 C:\WINDOWS\system32\xpsp2res.dll
VM Arguments:
java_command: testjava
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:\Perl\bin\;C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\Java\jdk1.5.0_09\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\gs\gs7.06\bin;C:\gs\gs7.06\lib;C:\Program Files\Common Files\Symbian\tools;C:\Program Files\CSL Arm Toolchain\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\90\Tools\binn\;D:\90\DTS\Binn\;D:\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;E:\IsoBuster;C:\Program Files\Intel\DMIX
USERNAME=Santhosh
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 (cores per cpu 2, threads per core 1) family 6 model 15 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 1037308k(420180k free), swap 2496452k(1944308k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_09-b01) for windows-x86, built on Sep 7 2006 13:59:31 by "java_re" with MS VC++ 6.0
Pls do checkk...
once agaon thanks
Santo
|
|
|
|
|
Is this the same version of the Java truntime that the program was compiled for?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
@ Stuart
I had checked with the versions in both the systems...they are the same..
What next....
pls continue helping...
Santo
|
|
|
|
|
I'll suggest you get busy with the debugger
If the target machine hasn't got Visual Studfio, then use WinDbg[^]. Debug java.exe, specifying the entrypoint class on the command-line as you would normally and run the Java app. When the exception occurs (looks like it's in kernel32 during a call to the C run-time) the debugger should give you better information about where it's happened.
The debugger will warn you that Java.exe has no debug information, but that doesn't matter.
This approach does work for debugging native+Java hybrids - I used it myself last week to debug my very first app using JNI
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
you are running the debug build. This isnt fine for a target machine.
test_latestDllCpp.dll is your c++ dll. Where is the c# dll???
google yourself: "siginfo: ExceptionCode=0xe06d7363, ExceptionInformation=0x19930520 0x0007fa2c 0x10011a4c " from your log. Some curios errors. I have no clue other than "unexpected errors"
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi Karstenk
Thanks for ur reply ... even if i changed it to release mode it s d same..
ALso i had put together all the dlls and then have compiled..
no difference...
Santo
|
|
|
|
|
is the proper .net Framework installed?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
KarstenK
yes... they are proper...dotnetframework3.5
Thanks once again...
Santo
|
|
|
|
|
Hi everybody.
current, I using source vc++ to created bmp image for Datamatrix.
it fixed 1 pixel. I need draw bmp image larger but don't know repair in source code.
help me. thanks very much
nothing
|
|
|
|
|
How could you get any help without posting the relevant code?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Is there any way where by providing a VALUE NAME and KEY NAME it will search all the values by iterating sub-keys?
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
|
I have been searching the web for the past couple of days trying to find figure out how to create a video feed from my program that will appear as a web cam in other applications.
Thanks in advanced.
|
|
|
|
|
My best guess would be that you should write a driver for your "emulated webcam", maybe try looking into DirectShow[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
MSDN says:
//-----------------------------------
SystemTimeToTzSpecificLocalTime
The SystemTimeToTzSpecificLocalTime function converts a Coordinated Universal Time (UTC) to a specified time zone's corresponding local time.
//-----------------------------------
Now I need an inverse function of above, which can convert local time to UTC time.
Is there a function to do that?
modified on Tuesday, June 23, 2009 3:52 AM
|
|
|
|
|
|
many our clients are still using win2k, so I have to make it work on Win2k.
|
|
|
|
|