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

World: r4wp

[#Red] Red language group

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]
Pekr
23-Aug-2012
[1340x2]
Entry Point RVA: 	00001A8Bh
Entry Point RAW: 	00000E8Bh
still no luck with loading it using R2 though ...
DocKimbel
23-Aug-2012
[1342]
So, it's not an entry point issue...
Pekr
23-Aug-2012
[1343]
well, do we need those libraries being loadable using R2?
DocKimbel
23-Aug-2012
[1344x3]
That should work, we need at least to know what causes this.
Would be nice if more ppl on Windows could test it, so we maybe get 
a clue why it doesn't load on 
some configs.
Pekr: are you running an admin session on W7? (or a user with admin 
rights)
Pekr
23-Aug-2012
[1347]
I have Vista 32 bit, I am an admin ..
DocKimbel
23-Aug-2012
[1348]
So far, I suppose that the issue is caused by either:
- lack of relocation ability from the DLL (my #1 suspect)

- compatibility issue(s) with some system DLL (msvcrt.dll most probably)
- another unknown reason

I'll try to add relocation data to the DLL tonight.
PeterWood
23-Aug-2012
[1349]
When I ran my successful test, I ran as a user not admin.
sqlab
23-Aug-2012
[1350]
same problem here

>> read %temp.dll

== {MZ€^@^A^@^@^@^D^@^P^@ÿÿ^@^@@^A^@^@^@^@^@^@@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@€^@^@^@^N
^_º^N...
>> lib:  load/library %temp.dll
** Access Error: Cannot open temp.dll as library
** Near: lib:  load/library %temp.dll
	
but
>> load/library %shell32.dll
>>
Kaj
23-Aug-2012
[1351x2]
What if you explicitly point to the current directory? Is that %.\temp.dll 
on Windows?
Or try the full path to the DLL
sqlab
23-Aug-2012
[1353]
i tried with full path too. same result
Kaj
23-Aug-2012
[1354]
OK, it fixes some cases with R3 extension loading
Pekr
23-Aug-2012
[1355]
it is imo not definitely a path problem. Just check with exists? 
%temp.dll, and it returns true. Still library is not loading ...
Endo
24-Aug-2012
[1356x2]
I suspect about the different msvcrt.dll versions.

AdrianS: "did REBOL core only have library support if you had a licensed 
sdk?" - yes licensed Core (Core/Pro) support library.
I just tried on Win7 64bit, it works.
Rebolek
24-Aug-2012
[1358]
msvcrt.dll - version 7.0.2600.5701
DocKimbel
24-Aug-2012
[1359x2]
I tried also on my W7 x64 instance on laptop, it works.
msvcrt.dll - v7.0.7600.16930
kernel32.dll - v6.1.7600.16850
Pekr
24-Aug-2012
[1361x2]
mine is: 7.0.6002.18551 (vistasp2_gdr.111214-0301)
kernel32: 6.0.6001.18000 (longhorn_rtm.080118-1840)
PeterWood
24-Aug-2012
[1363]
msvcrt.dll - 7.0.7601.21878
kernel32.dll - 6.1.7601.17651
MagnussonC
24-Aug-2012
[1364]
Win 7 x64
msvcrt.dll 7.0.7601.17744
kernel32.dll 6.1.7601.17651
DocKimbel
24-Aug-2012
[1365x3]
So for ppl where it loads, we have msvcrt rev >= 7600, for ppl where 
it doesn't load, we have rev 2600 and 6002 (Vista). 

Rebolek, are you running on a pre-RTM version of W7?
Anyway, it should load even on XP, so I really suspect a relocation 
need for boxes with older msvcrt.
I have changed 'on-load definition in last commit:


You can now _optionally_ defined 4 callbacks when producing a DLL:

 on-load:        func [hModule [integer!][...]
 on-unload:      func [hModule [integer!][...]
 on-new-thread:  func [hModule [integer!][...]
 on-exit-thread: func [hModule [integer!][...]

 hModule is a handler on the DLL instance.

They don't need to be added to #export block.
sqlab
24-Aug-2012
[1368]
I tried to put a msvcrt.dll > 7600 into the same path as temp.dll, 
into system32 or into the rebol home path. still no success
Pekr
24-Aug-2012
[1369]
Doc - the SW you suggest for Git is extremly nice, almost like working 
with tablet, but otherwise not much usefull to me. It does not add 
context menu to the shell, so no right click upon the directory. 
I also did not figured out, how should I add red in there? There 
is no place to paste the https://github.com/dockimbel/Red.gitURL 
... I will install back some other git client ...
Henrik
24-Aug-2012
[1370]
I try to keep with the console Git to practice it properly, but it 
may not be easy under Windows. I don't know.
Endo
24-Aug-2012
[1371]
My msvcrt.dll version is 7.0.2600.5512 (on XP/Pro Turkish). and it 
works.
Rebolek
24-Aug-2012
[1372]
The 2600 version was on virtual XP, on W7 I've got 7.0.7601.17744
Endo
24-Aug-2012
[1373]
I just tested on a XP/Pro on VirtualBox, msvcrt.dll version is 7.0.2600.2180, 
it works.
sqlab
24-Aug-2012
[1374]
Works on W7/64/Pro, but not on XP/Pro