MLIB
Loading...
Searching...
No Matches
serenum.h
Go to the documentation of this file.
1/*
2 Copyright (c) Mircea Neacsu (2014-2025) Licensed under MIT License.
3 This file is part of MLIB project. See LICENSE file for full license terms.
4*/
5
7
8#pragma once
9
10#include <vector>
11#include <string>
12
13#if __has_include("defs.h")
14#include "defs.h"
15#endif
16
17namespace mlib {
18
19bool SerEnum_UsingCreateFile (std::vector<int>& ports);
20bool SerEnum_UsingSetupAPI (std::vector<int>& ports, std::vector<std::string>& names);
21bool SerEnum_UsingRegistry (std::vector<int>& ports);
22
23} // namespace mlib
bool SerEnum_UsingCreateFile(std::vector< int > &ports)
Iterate from 1 to 255 finding those ports for which the CreateFile function doesn't fail.
Definition serenum1.cpp:33
bool SerEnum_UsingSetupAPI(std::vector< int > &ports, std::vector< std::string > &names)
Uses SetupDiEnumDeviceInfo function to retrieve available COM ports and their friendly name.
Definition serenum2.cpp:22