• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
23-Aug-2012
[1276]
How do I get different branch onto my PC?

 If you're using TortoiseGit client, just search in the context menu 
 for "Switch/Checkout", then select the `dyn-lib-emitter`branch. If 
 you don't have it, you need to click on "..." button and create a 
 remote to dockimbel/dyn-lib-emitter.
Pekr
23-Aug-2012
[1277]
Well, downloaded zip. I was scared it will sync to the same dir and 
will create a mess :-)
DocKimbel
23-Aug-2012
[1278]
It will sync in the same dir, replacing everything that needs to 
be replaced, no mess here, just Git doing its job! ;-)
Pekr
23-Aug-2012
[1279]
well, and if you want to keep several branches?
Endo
23-Aug-2012
[1280x2]
I've uploaded a file on Altme, DLLFunc, it loads a dll and prints 
the function names. It works with temp.dll, shows "f1" function.
Its Windows only.
DocKimbel
23-Aug-2012
[1282x2]
You need to checkout the branch in a new local folder if you want 
to have several branches of code at the same time (I never had that 
need as switching between them is done in a couple of seconds).
Endo: thanks, tested the downloaded %temp.dll from Rebolek, shows 
"f1".
MagnussonC
23-Aug-2012
[1284]
I think I stopped F-secure, but still no output :(
Pekr
23-Aug-2012
[1285x3]
Entry Point RAW: 	Invalid or not in CODE section (possible Encrypted 
or Compress Executable)
I use Total Commander, and they have cool plugin called FileInfo. 
It is able to nicely inspect DLLs .... I am comparing temp.dll to 
some other ....
I checked four additional DLLs, and the tool reports for all of them:

Entry Point RVA: 	00001000h
Entry Point RAW: 	00000400h

temp.dll is however:

Entry Point RVA: 	00000000h

Entry Point RAW: 	Invalid or not in CODE section (possible Encrypted 
or Compress Executable)
DocKimbel
23-Aug-2012
[1288x2]
Entry point should be 0 (for now).
hmm...
Pekr
23-Aug-2012
[1290]
Other libraries have rather extensive file type info, temp.dll has 
no such info. Don't want to spam it here ....
DocKimbel
23-Aug-2012
[1291]
Can you pm me the reports?
Pekr
23-Aug-2012
[1292]
E.g. libiconv: file type: Dynamic Link Library (0x2) .... is such 
info just some metadata, which is not needed?
DocKimbel
23-Aug-2012
[1293]
It is needed, but the DLL type flag should be 0x2000.
Pekr
23-Aug-2012
[1294x3]
however - it might be unrelated, if it works for some of you, and 
it does not work for me and rebolek. Maybe somehow related to a czech 
locale Windows version? Any language dependency?
That info (type flag) is not available or at least the tool can't 
see it ...
.... for temp.dll
Gregg
23-Aug-2012
[1297]
Just catching up. This is all great Doc (et al). Wow.
DocKimbel
23-Aug-2012
[1298x2]
Ah ok, the info you get there are Windows file metadata (probably 
a resource section in the file), these are not from DLL core structures.
Gregg: thanks, it would be better if we could solve the issue of 
REBOL not loading those DLLs for some ppl...
MagnussonC
23-Aug-2012
[1300]
Dependency Walker 2.2 (to check DLL:s etc on Win)
DocKimbel
23-Aug-2012
[1301x2]
I use PE Explorer.
(which has also a handy disassembler)
Pekr
23-Aug-2012
[1303]
otoh who knows, how reliable is R2's DLL interface? Maybe it checks 
on some metadata, e.g. a language? It seems only on Czech Windows 
is the problem ...
DocKimbel
23-Aug-2012
[1304x2]
Gregg: could you try to load this DLL using R2: http://box.lebeda.ws/~rebolek/temp.dll

lib: load/library %temp.dll
f1: make routine! [a [integer!] return: [integer!]] lib "f1"
Pekr: I wonder if there's not an issue with the lack of entry point 
in the DLL, I just don't get why REBOL would choke on it sometimes 
and never the C apps (except your testing tool).
Pekr
23-Aug-2012
[1306]
well, but the same library works for you and other users, when used 
with R2, so ....
DocKimbel
23-Aug-2012
[1307]
That's the weid part...
PeterWood
23-Aug-2012
[1308x2]
%tamp.dll works for me in W7 running under Virtual Box.
%temp.dll !
DocKimbel
23-Aug-2012
[1310]
REBOL does not return an accurate error msg when failing to find 
a DLL file:

>> lib: load/library %xyz.dll
** Access Error: Cannot open xyz.dll as library
** Near: lib: load/library %xyz.dll


This can be misleading thinking that %xyz.dll exists but is invalid, 
while it doesn't exists at all. So for the people having issue with 
%temp.dll, check if the DLL is present in the working folder and 
that you have correctly CD to that folder in your REBOL session.
MagnussonC
23-Aug-2012
[1311]
Rebol and DLL in same dir. No response at all for me.
DocKimbel
23-Aug-2012
[1312]
No response? That means that it loaded fine.
Rebolek
23-Aug-2012
[1313]
My virtual XP machine is running I think Belgian localistation (turned 
off, but the base system is localised). W7 host is Czech localisation. 
I should try this with original US version.
PeterWood
23-Aug-2012
[1314]
MagnussunC: did you try to call the function::

>>f1 123
MagnussonC
23-Aug-2012
[1315]
>> lib: do load/library %temp.dll
>> f1 123
** Script Error: f1 has no value
** Where: halt-view
** Near: f1 123
DocKimbel
23-Aug-2012
[1316x2]
MagnussonC: you need to define the routine! first:

lib: do load/library %temp.dll
f1: make routine! [a [integer!] return: [integer!]] lib "f1"
f1 123
Rebolek: I run a french localized W7 here and no problem with the 
DLL, I doubt the localization is the cause...
MagnussonC
23-Aug-2012
[1318]
OK, then it works, I guess
DocKimbel
23-Aug-2012
[1319]
So only Pekr and Rebolek have issues with it so far...
AdrianS
23-Aug-2012
[1320]
works for me too - Win 7 64 bit
DocKimbel
23-Aug-2012
[1321]
Rebolek and Pekr: I just fixed a regression in PE header, can you 
try it with this new revision?
AdrianS
23-Aug-2012
[1322x2]
just a note that the REBOL that is linked on the Red github page 
is core, and that doesn't work
I don't recall - did REBOL core only have library support if you 
had a licensed sdk?
Pekr
23-Aug-2012
[1324]
Doc - no change ...
DocKimbel
23-Aug-2012
[1325]
Can you check if your TotalCommander tool still spits out the error 
on Entry Point RAW?