SDK C++ sample

CodeOutput
#include "../dgsdkdefs.h"
#include <stdio.h>

int main()
{
  int i;
  DG_HANDLE	handle = InitMask("Aa{5} Aa{7}");
  if(handle==0)
	printf("Could not allocate Handle for Fill Method [%s]\n",GetError(0));
  else
  {
	printf("Line\tValue\n");
	for(i=0; i<15; i++)
		printf("%d\t%s\n",i+1,MaskValue(handle));

	CloseH(handle);
  }
}
Line	Value
1	Phghum Ealnlfdx
2	Ficv Scggbwkf
3	Nqu Xwnfozv
4	Srkjp Reggxr
5	Pnv Ysmwcy
6	Sycqpe Vieffmzn
7	Imk Asw
8	Srn Zkcxfx
9	Tlgyp Sf
10	Dpoefx Zboejuvp
11	Vao Ygo
12	Eyfp Bnlj
13	Vripya Myhwq
14	Nq Qpxu
15	Jjo Ovo

SDK C# sample

CodeOutput
using System;
using System.Runtime.InteropServices;

class LowLevelAPISample
{
[DllImport("dgsdk.dll")] 
	static extern int ShortRandom(int from, int to);
[DllImport("dgsdk.dll")] 
	static extern string DateRandom(string format,string from,string to);
[DllImport("dgsdk.dll")] 
	static extern string TimeRandom(string format,string from,string to);

 public static void Main()
 {
	int i;

	Console.WriteLine("Short\tDate\tTime");
	for(i=0; i<20; i++)
	{
		Console.WriteLine("{0}\t{1}\t{2}",
			ShortRandom(100,200),
			DateRandom("DD.MM.YYYY","01.01.2000","31.12.2009"),
			TimeRandom("HH:MM:SS","00:00:00","23:59:59"));
	}
 }
}
Short	Date	Time
160	12.12.2004	04:29:04
119	19.07.2002	08:05:05
127	02.04.2001	11:55:02
165	28.01.2001	12:02:33
182	23.11.2001	20:38:35
181	18.07.2001	18:09:52
165	18.08.2005	06:23:51
172	03.10.2003	08:21:31
114	24.05.2007	20:22:57
137	28.08.2003	21:49:58
175	17.12.2000	18:48:46
126	11.03.2004	16:26:45
108	21.10.2000	14:06:21
159	04.09.2009	23:24:34
163	07.09.2006	08:11:28
108	25.04.2006	19:17:58
173	09.07.2009	05:33:35
120	20.07.2004	18:57:26
196	24.07.2001	17:44:52
113	01.10.2007	21:57:12

SDK ASP (VB Script) sample

CodeOutput
<html>
<%
   Set dgen = CreateObject("DGSDK.DGLib")
   handle = dgen.InitLibrary("library.vlib","Countries")
   if handle=0 then
      response.Write "Error loading library: "
      response.Write dgen.GetError(0)
   else
%>
<table border=1 cellpadding=3 cellspacing=0 style="border-collapse: collapse"
bordercolor=black> <tr><th>Line</th><th>Value</th></tr> <% for i = 1 to 10 %> <tr> <td><%=CStr(i)%></td> <td><%=dgen.LibraryValue(handle,0)%></td> </tr> <% next end if %> </html>
Line	Value
1	Sierra Leone
2	Micronesia, Federal State of
3	Ecuador
4	Finland
5	Turkmenistan
6	United Arab Emirates
7	Lebanon
8	Brazil
9	Holy See (Vatican City State)
10	Bhutan