invoke CoInitializeEx ,NULL, COINIT_APARTMENTTHREADED
include shlobj.sdk
richedit.asm(73) : Error A2080: Block nesting error: _TEXT
Ok, I downloaded your sdk and this sample.
"ready to use sdk" is perhaps a little bit euphemistic, but with some experience in this matter it's no problem at all to make it work.
The "block nesting error" is a bit misleading, because it claims _TEXT to be the segment causing trouble. In fact, it's a few "DATA SEGMENT" directives that still occur in the source files that cause this error. It's an error, because the segment is opened but never "closed" ( with a DATA ENDS directive ).
Just replace the "DATA SEGMENT" with ".data" and it should work.
Btw., the "ERROR macro" is no problem, because a macro procedure is expanded only if it occurs at position 0 or 2 (after a label, followed by a ':' ).