@Phil I have still been unable to get any examples to work, now this is all new to me, so I'm convinced I'm missing something obvious, I've listed the steps I took and the software/tool I'm using.
Windows 10 64bit
Free Pascal Compiler version 3.0.2 [2017/02/27] for x86_64
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Source files extracted from p4g.zip
15/03/2015 22:18 1,826 ndfd_types.pas
14/02/2016 11:17 5,711 ndfdmod.pas
24/04/2016 16:35 4,531 PyAPI.pas
changed PyAPI to use python36.dll (3,610,776)
const
{$IFDEF MSWINDOWS}
{$IFDEF USE_PYTHON3}
PythonLib = 'python36.dll'; //'python35.dll';
{$ELSE}
PythonLib = 'python27.dll';
{$ENDIF}
{$ENDIF}
compiled with
fpc -dUSE_PYTHON3 -ondfdmod64_3.pyd ndfdmod.pas
D:\Code\Python\library\x64\ndfd>C:\lazarus\fpc\3.0.2\bin\x86_64-win64\fpc -dUSE_PYTHON3 -ondfdmod64_3.pyd ndfdmod.pas
Free Pascal Compiler version 3.0.2 [2017/02/27] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling ndfdmod.pas
Compiling ndfd_types.pas
Compiling NdfdLib.pas
Compiling PyAPI.pas
Linking ndfdmod64_3.pyd
628 lines compiled, 0.9 sec, 73024 bytes code, 4916 bytes data
D:\Code\Python\library\x64\ndfd>
tried to import with python
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ndfdmod64_3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
>>>