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

World: r4wp

[#Red] Red language group

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?
Pekr
23-Aug-2012
[1326x2]
yes, still in there:

Entry Point RVA: 	00000000h

Entry Point RAW: 	Invalid or not in CODE section (possible Encrypted 
or Compress Executable)
I will better redownload .zip archive. Is there any way how to get 
link to particular branch, so that I can keep my working directories 
intact and not mix a stuff from various branches into one directory?
DocKimbel
23-Aug-2012
[1328]
You can't mix things if you use a Git client and do a Switch/checkout 
each time...
Oldes
23-Aug-2012
[1329]
https://github.com/dockimbel/Red/zipball/dyn-lib-emitter
DocKimbel
23-Aug-2012
[1330x2]
Pekr: be sure to get the lastest commit (pushed a minute ago).
You can now provide an entry-point callback, see the commit log: 
https://github.com/dockimbel/Red/commit/8e7c1f84226b8a7ebfde0ec08136e88f566fb4bb
Pekr
23-Aug-2012
[1332]
I don't understand Git, it's complex on me. How can I not mix stuff? 
What my Tortoise git chooses to sync? How do I request particular 
branch?
DocKimbel
23-Aug-2012
[1333x2]
It syncs the "versioned" files only (the one registered in the repo), 
your other files are left untouched.
How do I request particular branch?
 I gave you the procedure earlier for TortoiseGit.
Pekr
23-Aug-2012
[1335x2]
I am ok to download zip until I figure it out ... Did so, and no 
change yet ...
should I do anything else, apart from:

do/args %rsc.r "-t WinDLL %tests/temp.reds"

?
DocKimbel
23-Aug-2012
[1337x3]
Pekr: maybe you should try with this client: http://windows.github.com
Yes...you need to test with a different source:
Red/System []


on-load: func [a [integer!] b [integer!] c [integer!] return: [logic!]][
	print-line "on-load executed"
	true
]

f1: func [a [integer!] return: [integer!]][a + 1]

#export [on-load f1]