Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change
Quote from: daydreamer on April 17, 2025, 04:34:47 PMI most need advice on reading in bitmap in dosCould you be more specific on this? What do you need, how the format looks like?
QuoteThe current code is based on realise that segmented mode not necessarily need to be use it like bank switching,but 320 bytes line in mode 13h is evenly divided by 16, so decrease / increase a segment register from ram I copy landscape from = scroll up /downI'm not sure if I understood you correctly. But in mode 13h, the 64 KiB VRAM window has a fixed address, starting at 0xA000:0000. This address cannot be moved. Thus you can't move the 64 KiB VRAM window in mode 13h.
Quote from: TimoVJL on April 18, 2025, 04:18:36 AMQuote from: NoCforMe on April 18, 2025, 04:06:43 AMWhere did yours come from? Is it the original one that came with the OS?Perhaps with display driver, like mine
Quote from: NoCforMe on April 18, 2025, 04:06:43 AMWhere did yours come from? Is it the original one that came with the OS?Perhaps with display driver, like mine
Quote from: rsala on April 17, 2025, 08:17:46 PMI have no problem on Windows 7. I attach an image of the d2d1.dll version on my Windows 7 64-bit.Well, apparently that's the problem. Here's my version of that DLL (shown by my version viewer):
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <msxml6.h>
#include <stdio.h>
#include <objbase.h>
void HandleError(HRESULT hr, LPCWSTR message);
void DisplayNodeInfo(IXMLDOMNode* pNode);
HRESULT ParseXmlFile(LPCWSTR filename);
void HandleError(HRESULT hr, LPCWSTR message) {
wprintf(L"Error: %s (0x%08X)\n", message, hr);
}
void DisplayNodeInfo(IXMLDOMNode* pNode) {
BSTR nodeName = NULL;
HRESULT hr = pNode->get_nodeName(&nodeName);
if (SUCCEEDED(hr)) {
if (nodeName) {
wprintf(L"\nElement: %s\n", nodeName);
SysFreeString(nodeName);
}
}
// Get attributes
IXMLDOMNamedNodeMap* pAttributes = NULL;
hr = pNode->get_attributes(&pAttributes);
if (SUCCEEDED(hr)) {
long attrCount;
pAttributes->get_length(&attrCount);
for (long j = 0; j < attrCount; j++) {
IXMLDOMNode* pAttrNode = NULL;
hr = pAttributes->get_item(j, &pAttrNode);
if (SUCCEEDED(hr) && pAttrNode) {
BSTR attrName = NULL;
VARIANT attrValue;
VariantInit(&attrValue);
hr = pAttrNode->get_nodeName(&attrName);
if (SUCCEEDED(hr)) {
hr = pAttrNode->get_nodeValue(&attrValue);
if (SUCCEEDED(hr) && attrName && attrValue.vt == VT_BSTR) {
wprintf(L" %s = %s\n", attrName, attrValue.bstrVal);
}
VariantClear(&attrValue);
}
if (attrName) SysFreeString(attrName);
pAttrNode->Release();
}
}
pAttributes->Release();
}
}
HRESULT ParseXmlFile(LPCWSTR filename) {
IXMLDOMDocument* pXMLDoc = NULL;
IXMLDOMNodeList* pNodeList = NULL;
HRESULT hr;
// Create DOM document
hr = CoCreateInstance(CLSID_DOMDocument60, NULL, CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument, (void**)&pXMLDoc);
if (FAILED(hr)) {
HandleError(hr, L"Failed to create XML document object");
return hr;
}
// Set async property to false
VARIANT_BOOL varAsync = VARIANT_FALSE;
pXMLDoc->put_async(varAsync);
// Load XML file
VARIANT varFileName;
VariantInit(&varFileName);
varFileName.vt = VT_BSTR;
varFileName.bstrVal = SysAllocString(filename);
VARIANT_BOOL varStatus;
hr = pXMLDoc->load(varFileName, &varStatus);
VariantClear(&varFileName);
if (FAILED(hr)) {
HandleError(hr, L"Failed to load XML file");
pXMLDoc->Release();
return hr;
}
if (varStatus != VARIANT_TRUE) {
IXMLDOMParseError* pError = NULL;
pXMLDoc->get_parseError(&pError);
if (pError) {
BSTR bstrReason = NULL;
pError->get_reason(&bstrReason);
wprintf(L"Parse Error: %s\n", bstrReason ? bstrReason : L"Unknown error");
SysFreeString(bstrReason);
pError->Release();
}
pXMLDoc->Release();
return E_FAIL;
}
wprintf(L"\nSuccessfully loaded manifest file: %s\n", filename);
// Query all elements to demonstrate parsing
BSTR bstrQuery = SysAllocString(L"//*");
hr = pXMLDoc->selectNodes(bstrQuery, &pNodeList);
SysFreeString(bstrQuery);
if (FAILED(hr)) {
HandleError(hr, L"Failed to select nodes");
pXMLDoc->Release();
return hr;
}
long nodeCount;
hr = pNodeList->get_length(&nodeCount);
if (FAILED(hr)) {
HandleError(hr, L"Failed to get node count");
pNodeList->Release();
pXMLDoc->Release();
return hr;
}
wprintf(L"\nFound %d elements in manifest:\n", nodeCount);
// Process each node
for (long i = 0; i < nodeCount; i++) {
IXMLDOMNode* pNode = NULL;
hr = pNodeList->get_item(i, &pNode);
if (SUCCEEDED(hr) && pNode) {
DisplayNodeInfo(pNode);
pNode->Release();
}
}
// Specific query for assemblyIdentity elements
bstrQuery = SysAllocString(L"//assemblyIdentity");
hr = pXMLDoc->selectNodes(bstrQuery, &pNodeList);
SysFreeString(bstrQuery);
if (SUCCEEDED(hr)) {
hr = pNodeList->get_length(&nodeCount);
if (SUCCEEDED(hr) && nodeCount > 0) {
wprintf(L"\nFound %d assemblyIdentity elements:\n", nodeCount);
for (long i = 0; i < nodeCount; i++) {
IXMLDOMNode* pNode = NULL;
hr = pNodeList->get_item(i, &pNode);
if (SUCCEEDED(hr) && pNode) {
DisplayNodeInfo(pNode);
pNode->Release();
}
}
}
pNodeList->Release();
}
// Specific query for requestedExecutionLevel
bstrQuery = SysAllocString(L"//requestedExecutionLevel");
hr = pXMLDoc->selectNodes(bstrQuery, &pNodeList);
SysFreeString(bstrQuery);
if (SUCCEEDED(hr)) {
hr = pNodeList->get_length(&nodeCount);
if (SUCCEEDED(hr) && nodeCount > 0) {
wprintf(L"\nFound %d requestedExecutionLevel elements:\n", nodeCount);
for (long i = 0; i < nodeCount; i++) {
IXMLDOMNode* pNode = NULL;
hr = pNodeList->get_item(i, &pNode);
if (SUCCEEDED(hr) && pNode) {
DisplayNodeInfo(pNode);
pNode->Release();
}
}
}
pNodeList->Release();
}
pXMLDoc->Release();
return S_OK;
}
int wmain(int argc, WCHAR* argv[]) {
if (argc < 2) {
wprintf(L"Usage: %s <manifest_file.xml>\n", argv[0]);
return 1;
}
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (FAILED(hr)) {
HandleError(hr, L"CoInitializeEx failed");
return 1;
}
hr = ParseXmlFile(argv[1]);
if (FAILED(hr)) {
wprintf(L"Failed to parse XML file (HRESULT: 0x%08X)\n", hr);
}
CoUninitialize();
return 0;
}
Quote from: bugthis on April 17, 2025, 04:29:07 AMUnfortunately, I don't have MASM >= v6.x and haven't been able to test it with it.Visual Studio includes MASM and can be downloaded and installed free of charge. See this topic in this forum: