Skip to content

Instantly share code, notes, and snippets.

@KevinRagsdale
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KevinRagsdale/561710fa642d8eb66418 to your computer and use it in GitHub Desktop.
Save KevinRagsdale/561710fa642d8eb66418 to your computer and use it in GitHub Desktop.
** This DLL is a simple PRG file.
** It will create a web page "on the fly"
** and return it as a string to the
** calling program.
DEFINE CLASS Demo As Session OLEPUBLIC
FUNCTION GetHTML() As String
LOCAL lcString As String
TEXT TO m.lcString TEXTMERGE NOSHOW
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Demo</title>
</head>
<body>
<p>Welcome to my demo!</p>
<p>This page was generated by a multi-threaded DLL created with:</p>
<p><b><<VERSION()>></b></p>
<p><<_VFP.ServerName>></p>
<hr />
<script src="https://gist.github.com/KevinRagsdale/237c8553adc31f1cf321.js"></script>
<hr />
<script src="https://gist.github.com/KevinRagsdale/561710fa642d8eb66418.js"></script>
<hr />
<p><em>This page was created <<TTOC(DATETIME())>>.</em></p>
</body>
</html>
ENDTEXT
RETURN m.lcString
ENDFUNC
ENDDEFINE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment