I'm not a Windows user any more, my windows api knowlege is mostly outdated and rotten. but a quick look at the DllRegisterServer() function, this line feels very suspicious to me:
let len = GetModuleFileNameW(None, &mut buf) as usize;
if I remember correctly, when you pass a NULL as first argument to GetModuleFileNameW(), it returns the name of the executable file, regsvr32.exe in this case, not the name of your dll comtest.dll.
to confirm if this is the case, register the dll and then check the InprocServer32 registry key you just created. is it regsvr32.exe or comtest.dll?
btw, I'm not really into COM, but I remember the windows crate provides macros to generate the vtable boilerplate code so you can use "normal" rust code to authorize COM classes, although they are not well documented.
see the #[interface] and #[implement] macros, which are defined in windows-interface and windows-implement crates, respectively, and re-exported in the windows-core crate, or the windows::core submodule.
The problem is you registered regsvr32.exe as an inproc32 server instead of your .dll, because you provided None to GetModuleFileNameW as a first argument. Check MSDN to see how it works.
Then, use powershell to see what you have in the registry
cd HKCU:\Software\Classes\CLSID\
Get-ChildItem '.\{D61F6C41-9E19-4B8D-9C6B-4B72B5D1A123}\'
You should see your .dll name, but you probably do not.
How to fix it?
Here is cargo.toml I used to compile your file:
name = "myserver"
//..
[lib]
crate-type = ["cdylib"]
//...
so the name is myserver.dll. Lets load it (again, use MSDN to see how GetModuleHandleW works), you might also use crate_name crate to get a crate name probably not to hardcode it.
let h = GetModuleHandleW(&HSTRING::from("myserver")).unwrap();
let len = GetModuleFileNameW(Some(h), &mut buf) as usize;
I am not sure what do you mean by "web client", but if it is 32-bit (quite strange in 2026) then you did everything correctly.
If you meant Internet Explorer, it is long time deprecated, and while it might work, I wouldn't recommend using such an old technology deprecated by the vendor.
RegAsm
This is a tool to registry .NET .dlls as COM objects, so you if you wrote your COM server in .NET, you would need it, but I do not think you need it for Rust.