Hi, With this piece of code, I get the message 824 : deelel <- paste(AccesDLL, "/regr.dll",sep="") if ( ! is.loaded(deelel)) { dyn.load(deelel) if ( ! is.loaded(deelel)) { cat("824 : ", deelel, "non charg?e\n") } } Am I doing something wrong in this code ? If not, what can prevent a DLL to be loaded ? And first is it a problem if the DLL is has been built on a 32bits Windows system and is used on a 64bits windows system ? Thanks in advance Jean Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse. Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message. Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus. ____________________________________________________ This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message. E-mail communication cannot be guaranteed to be timely secure, error or virus-free. [[alternative HTML version deleted]]
On 22/02/2016 10:24 AM, MAURICE Jean - externe wrote:> Hi, > With this piece of code, I get the message 824 : > > deelel <- paste(AccesDLL, "/regr.dll",sep="") > if ( ! is.loaded(deelel))The is.loaded function checks for symbols, not libraries. See ?is.loaded for examples.> { > dyn.load(deelel) > if ( ! is.loaded(deelel)) > { > cat("824 : ", deelel, "non charg?e\n") > } > } > > > Am I doing something wrong in this code ? > If not, what can prevent a DLL to be loaded ? And first is it a problem if the DLL is has been built on a 32bits Windows system and is used on a 64bits windows system ?It doesn't necessarily matter where it was built, but it definitely does matter what the target architecture is. If you are running 32 bit R, you'll see "Platform: i386-w64-mingw32/i386 (32-bit)" in the startup banner, and you need a 32 bit DLL. If you are running 64 bit R, you'll see "Platform: x86_64-w64-mingw32/x64 (64-bit)", and you need a 64 bit DLL. 32 bit Windows can only run 32 bit R, but 64 bit Windows can run either architecture. Duncan Murdoch
Hi Murdoch, Thanks for your quick answer. First : I have a 32 bits R running on a 64 bits Windows. So I think I can load 32bits DLL ? I haven't understood what I must give to is.loaded as parameter : the name of the DLL, the full path to it, the name of a routine in it, the value given by dyn.load (in fact this gives an error) ? About help : the only example, for is.loaded, I found in fullrefman.pdf was about dyn.load but is ununderstandable (?) because we have not the dyn.load command in the example. And if I write ?is.loaded in R I get nothing !! Best regards Jean Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse. Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message. Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus. ____________________________________________________ This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message. E-mail communication cannot be guaranteed to be timely secure, error or virus-free.