Skip to content

Instantly share code, notes, and snippets.

View jozefizso's full-sized avatar
🏳️‍🌈

Jozef Izso jozefizso

🏳️‍🌈
  • Slido, Cisco Systems
  • Bratislava, Slovakia
View GitHub Profile
title source author date
Another CLR hosts were shipped from Microsoft
Fumiaki Yoshimatsu
2003-10-05 19:38:52 +0900

Office 2003 made its appearance. It includes Word 2003 and Excel 2003. The buzz is on about the XML support provided by them and the other member of the Office 2003. However, there are other important feature of the two. Word 2003 and Excel 2003 are yet another CLR hosts. They host CLR if the document they load has specific properties set.

Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long
Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Public Const GWL_WNDPROC = (-4)
Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long
Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Public Const GWL_WNDPROC = (-4)
class Program
{
static void Main(string[] args)
{
var timestamp = DateTime.Now.ToFileTimeUtc();
var filename = $@"Doc_{timestamp}.docx";
try
{
var app = new Application();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NetOffice.ExcelApi;
namespace ConsoleApp4
{
class Program
Project: Access
- Ref: stdole
- Ref: Office
- Ref: DAO
- Ref: VBIDE
- Ref: ADODB
- Ref: OWC10
Project: ADODB
- Ref: stdole
Project: DAO
@jozefizso
jozefizso / symbols.bat
Created May 3, 2020 16:05
Visual Studio debugging symbols configuration
md E:\Symbols
md E:\Symbols\Sym
md E:\Symbols\SymCache
compact /c /s /i /q E:\Symbols\Sym\
compact /c /s /i /q E:\Symbols\SymCache\
setx /m DBGHELP_HOMEDIR E:\Symbols
setx /m _NT_SYMBOL_PATH SRV*E:\Symbols\Sym*http://msdl.microsoft.com/download/symbols
setx /m _NT_SYMCACHE_PATH E:\Symbols\SymCache
echo Hello > E:\Symbols\Sym\index2.txt
<?xml version="1.0" encoding="UTF-8"?>
<iso:CardInfo xmlns:iso="urn:iso:std:iso-iec:24727:tech:schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:iso:std:iso-iec:24727:tech:schema CardInfo.xsd">
<iso:CardType>
<iso:ObjectIdentifier>http://www.minv.sk/cif/cif-sk-egk-v1.xml</iso:ObjectIdentifier>
<iso:SpecificationBodyOrIssuer>MV SR</iso:SpecificationBodyOrIssuer>
<iso:CardTypeName xml:lang="EN">Alternative authenticator</iso:CardTypeName>
<iso:CardTypeName xml:lang="SK">Alternativny autentifikator</iso:CardTypeName>
<iso:Version>
@jozefizso
jozefizso / create-user.sh
Last active April 28, 2020 22:34
OpenShift Origin scripts
# create user - it requires to setup indetity as well
oc create user jozef_adm
oc create identity htpasswd_auth:jozef_adm
oc create useridentitymapping htpasswd_auth:jozef_adm jozef_adm
# assign the cluster wide admin role (OpenShift 3.11)
oc create clusterrolebinding jozef_adm_clusteradmin_role --clusterrole=cluster-admin --user=jozef_adm
oc adm policy add-cluster-role-to-user system:master jozef_adm
# assign the "sudo" priviledges to the user (OpenShift 4+)
> vagrant info
Vagrant failed to initialize at a very early stage:
The plugins failed to initialize correctly. This may be due to manual
modifications made within the Vagrant home directory. Vagrant can
attempt to automatically correct this issue by running:
vagrant plugin repair
If Vagrant was recently updated, this error may be due to incompatible