News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Recent posts

#81
The Campus / Re: Windows 11?
Last post by TimoVJL - April 18, 2025, 04:39:04 AM
Platform Update for Windows 7

https://www.microsoft.com/en-us/download/details.aspx?id=36805
This kind of updates have been available.

EDIT: 7-Zip can open it for checking those files.
#82
Pelle's C compiler and tools / Re: XmlLite reader test
Last post by TimoVJL - April 18, 2025, 04:29:30 AM
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms753140(v=vs.85)
Xmllite is for C++ and other languages, and it is LWCOM.
It used normal UNICODE string, so easier to use.
With dynamic loading it don't need import library.
Those def-files was for testing polib.exe for creating libraries.
#83
The Campus / Re: Windows 11?
Last post by rsala - April 18, 2025, 04:28:54 AM
As far as I know my version of d2d1.dll comes from Microsoft.  I was updating my Windows 7 until Microsoft stopped updating it. I updloaded the d2d1.dll file from my Windows 7 64-bit in case you want to download it and test.

https://easycode.cat/English/Download/d2d1.zip

Regards!
#84
16 bit DOS Programming / Re: 3d moonlander w scrolling ...
Last post by bugthis - April 18, 2025, 04:25:43 AM
Quote from: daydreamer on April 17, 2025, 04:34:47 PMI most need advice on reading in bitmap in dos
Could you be more specific on this? What do you need, how the format looks like?
It's easy to figure out how the BMP file format is structured. There are plenty of resources online.

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 /down
I'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.

Take a look at this book. This might interest you:
Michael Abrash's Graphics Programming Black Book

To flexibly move a bank window to any 64 KB block you need VESA VBE 2.0
#85
The Campus / Re: Windows 11?
Last post by NoCforMe - April 18, 2025, 04:22:32 AM
Quote from: TimoVJL on April 18, 2025, 04:18:36 AM
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

That makes sense. Wonder where I can get an updated version?
#86
The Campus / Re: Windows 11?
Last post by TimoVJL - April 18, 2025, 04:18:36 AM
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
#87
The Campus / Re: Windows 11?
Last post by NoCforMe - April 18, 2025, 04:06:43 AM
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):

You cannot view this attachment.

Where did yours come from? Is it the original one that came with the OS?
#88
Pelle's C compiler and tools / Re: XmlLite reader test
Last post by guga - April 18, 2025, 03:17:39 AM
For Visual Studio to parse manifest files....

Note: In properties, under linker + Additional dependencies, need to include this: msxml6.lib, ole32.lib, oleaut32.lib

#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;
}
#89
Pelle's C compiler and tools / Re: XmlLite reader test
Last post by guga - April 18, 2025, 03:14:00 AM
Perfect. Tks.
#90
16 bit DOS Programming / Re: [BX], OFFSET BUG - JWASM s...
Last post by lucho - April 18, 2025, 01:39:56 AM
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:

https://masm32.com/board/index.php?topic=8732.0

By the way, the MASM32 package includes MASM 6.14. Take into account that MASM versions newer than 6.11d require Windows but work with the HX DOS extender too.