Search found 47 matches

by Barbarossa
Sat Feb 18, 2023 11:18 am
Forum: Coding Questions
Topic: Scintilla: SCI_GETDIRECTFUNCTION or ScintillaSendMessage()?
Replies: 10
Views: 2407

Re: Scintilla: SCI_GETDIRECTFUNCTION or ScintillaSendMessage()?

Thanks, but that is not helping me at all.
It would benefit this thread if the answer was posted right here.
Surely it cannot be more than a couple of lines, right?

John
by Barbarossa
Fri Feb 17, 2023 11:23 pm
Forum: Coding Questions
Topic: Scintilla: SCI_GETDIRECTFUNCTION or ScintillaSendMessage()?
Replies: 10
Views: 2407

Re: Scintilla: SCI_GETDIRECTFUNCTION or ScintillaSendMessage()?

Sorry to dig up this old thread but I am trying to implement the SCI_GETDIRECTFUNCTION in PureBasic but I cannot seem to get it to work.
Basically I need to translate the C-code from the manual to PureBasic:
#include "Scintilla.h"
SciFnDirect pSciMsg = (SciFnDirect)SendMessage(hSciWnd, SCI ...
by Barbarossa
Fri Sep 04, 2015 1:13 pm
Forum: Coding Questions
Topic: Code structure problem with Modules
Replies: 8
Views: 1399

Re: Code structure problem with Modules

Thanks for the answers. I think I'll go with LittleJohns Solution for now.
MK-softs solution doesn't really work and gives me the same problems as before.

I really think the modules need some more improvement for them to work like they should in theory.

John
by Barbarossa
Thu Sep 03, 2015 4:10 pm
Forum: Coding Questions
Topic: Code structure problem with Modules
Replies: 8
Views: 1399

Code structure problem with Modules

Hi all,

I am trying to restructure my code into modules. But I am struggling with the "global" structures.

Let's consider the following code:


DeclareModule Mod1

Structure CommonStructure
Number.i
String.s
EndStructure

Declare Mod1_Function(*par.CommonStructure)

EndDeclareModule ...
by Barbarossa
Mon Jan 05, 2015 4:31 pm
Forum: The PureBasic Editor
Topic: PB IDE 5.30 B7 project files auto-sort
Replies: 4
Views: 4387

Re: PB IDE 5.30 B7 project files auto-sort

If the project is closed, the order of the tabs also saved in the project file and restored if you open the project.
Nope, that doesn't work (on 5.31 x86). It always ressorts back to alphabetic order.

John
by Barbarossa
Mon Jan 05, 2015 3:07 pm
Forum: General Discussion
Topic: Is there a guide for developing modules?
Replies: 10
Views: 5467

Re: Is there a guide for developing modules?

Sorry to dig up this thread but I recently discovered modules and started using them.

What is particulary handy is the UseModule command.
Because then you don't have to use the long names anymore.
Module::MyProcedure() becomes MyProcedure()

HOWEVER: when you do this the IDE doesn't recognize the ...
by Barbarossa
Mon Jan 05, 2015 2:54 pm
Forum: The PureBasic Editor
Topic: PB IDE 5.30 B7 project files auto-sort
Replies: 4
Views: 4387

Re: PB IDE 5.30 B7 project files auto-sort

I must agree with Tenaja. This alphabet sorting is quite annoying.
It used to be possible to change the taborder afterwards in the XML .pbp projectfile. But whatever you do there gets overruled when you open the project. I now ressorted to adding numeral prefixes before the names (like 01, 02, 03 ...
by Barbarossa
Fri Dec 19, 2014 10:10 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

RichAlgeni,

We all get days like that :wink:

After some more fiddling around with it I got it to work!

I told the portal builders to gradually build up the security level. First from HTTP, dan to SSL (HTTPS) and finally to SSL with server/client certificates.
We are now at step 2 and it works. I ...
by Barbarossa
Thu Dec 18, 2014 11:13 am
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

Well sorry if you are offended about my posts, that was never my intention.

Of course I am willing to the work myself. But since I don't really understand all this SSL business I want to make sure if the code is reliable. Otherwise it will be difficult for me to determine if it doesn't work because ...
by Barbarossa
Wed Dec 17, 2014 9:01 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

It's been working fine for me in a production setting for over a year.

Try it.
I did and it doesn't compile because obviously a pointer is not the same as an integer.

There are some more problems. The constants for the Cryptformats are not defined. From the manual:
cryptCreateEnvelope ...
by Barbarossa
Wed Dec 17, 2014 2:10 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

RichAlgeni,

Thanks, I will have a look and see if I can make it work.

Question: how well tested is this piece of code?

For example I see this procedure:
Procedure.l sslRecvData(secureSession.l, *sslError, *returnData, *returnLength , bufferSize.l, socketTimeout.l, maxReadTrys.l, *netSource ...
by Barbarossa
Tue Dec 16, 2014 4:17 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

What are you trying to achieve? is it just file transfers?

Yes, just file transfers back and forth (using GET and POST commands).

It is for a webbased portal which contains confidential documents. Our office server needs to communicate with the portal to retrieve documents and also has to give ...
by Barbarossa
Tue Dec 16, 2014 3:54 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

@dman

I am not sure if SSH is the same as SSL (like I said new to this) but I am willing to give it a try.

@Bernd

I tried it but it doesn't work. There is no output. Remember I have to use a 2048 bit private key to connect so I don't think a simple username and password would work.
by Barbarossa
Tue Dec 16, 2014 3:14 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Re: Make SSL Connection with OpenSSL

Hi Bernd,

Thanks for your reply. I was afraid this might not be an easy task :(

Alternative methods, like the one you are suggesting, are also welcome of course. I also tried something similair. Using RunProgram() to start the OpenSSL commandline tool because the command line tool itself ...
by Barbarossa
Tue Dec 16, 2014 1:00 pm
Forum: Coding Questions
Topic: Make SSL Connection with OpenSSL
Replies: 18
Views: 7982

Make SSL Connection with OpenSSL

Hi all,

I am trying to create a SSL connection to a secured server. I am very new to both SSL and library calls so basically I don't really know what I am doing :-).

I searched the forums but there is not much about this topic so I thought maybe we could make this a work in progress thread, build ...