Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: DLL's Web-Based Pub
PostPosted: June 15th, 2007, 3:34 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

If I were to create a web based pub, scripted to access a .dll, and deploy it, including the .dll file, on a server, could it run properly?

Or, is a .dll only accessible to a pub installed on the end-user's computer?

Still learning all that I can about using .dll's.

Any clarification would be appreciated.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: June 15th, 2007, 3:45 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
DLLs are only accessible from a standard executable publication - you cannot run code from a client side plugin.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 15th, 2007, 4:25 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks Duncan, for your reply.

Kind Regards,

Stephen

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: June 15th, 2007, 10:13 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Stephen,
I am looking at the 1Crypt DLL. As a test, I have it working on EncryptString and Decrypt string........I think.

I have to confirm that it is doing what it should. How do you think you will use it??? Encrypt files or strings. It appears to be a great wee program.

I am in the US just now, so I don't have as much time as usual, but as soon as I get something confirmed working I'll post the imp file.


Here is the script I have, but I haven't fully checked it yet.
Code:
function Load1CryptDLL()
{
   MyDLL=LoadDLL(SYSTEM_WINSYS_DIR+"OneCrypt.dll")
   if(MyDLL)
   {
      //Debug.trace("DLL loaded")

      }

   else
   {
      Debug.trace("DLL not loaded")
   }
}

function EncryptString(Key,EInString)
{
         EOutString=MyDLL.CallFn("EncryptString","false","string","string",Key,"string",EInString)
   }

function DecryptString(Key,DInString)
{
         DOutString=MyDLL.CallFn("DecryptString","false","string","string",Key,"string",DInString)
   }



Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: June 15th, 2007, 11:23 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Sandy

Thanks for your reply.

Over the past few days, with Mack's and now your help, I figured out how to get a .dll working in Opus, learning a lot in the process.

Kind Regards,

_________________
Stephen


Last edited by Stephen on June 16th, 2007, 1:49 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: June 16th, 2007, 2:41 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I'm a bit late to help you, but I'll attach it anyway. it's a demo of encrypting a string.
Sandy


You do not have the required permissions to view the files attached to this post.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: June 16th, 2007, 3:25 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Sandy

Yes, it works flawlessly and adds to my learning.

Thanks for your help.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: June 16th, 2007, 8:42 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi all,

Here's a simple way of adding string encryption / decryption to a publication that requires multiple line reads / writes.
Code:
// LOADS THE CIPHER DLL WHEN PUBLICATION STARTS
OneCryptDLL = LoadDLL( SYSTEM_PUBLICATION_DIR + "OneCrypt.dll" )

// SET THE KEY / PASSWORD TO DEFAULT
// THIS CAN BE CHANGED OR A VARIABLE USED
myKey = 'default'

//ENCRYPTS THE PASSED PLAINTEXT AND RETURNS THE CIPHERTEXT TO THE CALLING FUNCTION
function Encrypt(myString)
{
   if (OneCryptDLL)
   {
      return  OneCryptDLL.CallFn( "EncryptString", false, "string", "string", myKey, "string", myString)
   }
}

// DECRYPTS THE PASSED CIPHERTEXT AND RETURNS THE PLAINTEXT TO THE CALLING FUNCTION
function Decrypt(myString)
{
   if (OneCryptDLL)
   {
      return  OneCryptDLL.CallFn( "DecryptString", false, "string", "string", myKey, "string", myString)
   }
}

// THIS IS A BASIC SAVE TO FILE FUNCTION. HOWEVER, BY INCLUDING THE TEXT TO BE WRITTEN WITHIN ENCRYPT ()
// CAUSES THE PLAINTEXT TO BE CIPHERED AND THE CIPHERTEXT TO BE SAVED IN ITS PLACE.
function SaveFile()
{
   var textObj = OpenFile("c:\\myText.txt",true)

   textObj.WriteLine(Encrypt("Hello World"))
   textObj.Close()
}

// AGAIN THIS IS A BASIC READ FILE FUNCTION. HOWEVER, BY INCLUDING THE READLINE WITHIN DECRYPT()
// CAUSES THE CIPHERTEXT READ IN BE DECRYPTED BEFORE BEING STORED IN THE myName VARIABLE.
function ReadFile()
{
   var textObj = OpenFile("c:\\myText.txt")
   myName = Decrypt(textObj.ReadLine())

   Debug.trace(myName)
   textObj.Close()
}

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group