World: r4wp
[#Red] Red language group
older newer | first last |
Pekr 23-Aug-2012 [1266x6] | No, I mean the source code file ... but not sure it matters. E.g. for R3, I had difficulcy running some scripts, unless I re-saved the source file to UTF8. Some strange chars appeared in the console and apps crashed |
Loadlib works ... | |
I might try to compile the library myself. How do I get different branch onto my PC? | |
You need to use the WinDLL target: -t WinDLL - where, how? I need simple explanation how to compile the line: do/args %rsc.r .... what now? | |
... otherwise it produces the exe for me ... | |
got it, needs to be enclosed in string along with the script name ... | |
DocKimbel 23-Aug-2012 [1272] | do/args %rsc.r "-t WinDLL %temp.reds" |
MagnussonC 23-Aug-2012 [1273x2] | I compiled it OK and loadlib works |
Maybe it is F-secure that stops the DLL ... not sure it I can stop it at work. | |
DocKimbel 23-Aug-2012 [1275x2] | MagnussonC: thanks for testing. |
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 |
older newer | first last |