Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
double 型のデータ値をレジストリに格納する必要があるアプリケーションに取り組んでいます。私はMFCを使用していますが、(私が行った検索から)ジョブを実行するために表示される「theApp」の唯一の機能はGetProfileIntW、GetProfileStringWおよびGetProfileBinaryです。可能な限り精度を保ちながらデータを保存および取得するための最良の方法は何でしょうか?
GetProfileIntW
GetProfileStringW
GetProfileBinary
GetProfileBinary 関数は、唯一の合理的な選択です。多くの場合、文字列を使用すると変換が行われ、int を使用すると精度が失われます。
double *pMyDouble; UINT size = sizeof(*pMyDouble); GetProfileBinary(sectionName, valueName, (LPBYTE *)&pMyDouble, &size); double myDouble = *pMyDouble;