- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I am using GetVolumeInformation to get the serial number.
I am expecting an integet*4 value to be returned.
Thisis what I get on my computer, but on another computer I get 49,684,256,597,454
Iexpect integer*4 to be in the range -2,147,483,648 to 2,147,483,647.
What is going on?
David
コピーされたリンク
4 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You must have an INTEGER*8 variable in there somewhere or else you wouldn't even be able to display a value that large. How is it receiving the value? What does your code look like?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Code:
integer*4 Function VolSerialNo ! ------------------------------ ! get volume serial number use dfwin integer*4 lpVolumeSerialNo character lpszDriveName*50,lpszSystemName*50,Volume*50 logical*4 bRC lpszDriveName='c:'//char(0) bRC=GetVolumeInformation(lpszDriveName,Volume,50,LOC(lpVolumeSerialNo),NULL,NULL,lpszSystemName,32) VolSerialNo=iabs(lpVolumeSerialNo) end function
Here is my code to get the volume number, it is an integer*4
David
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Ok, how do you call this function and display the value? Is the function name declared as INTEGER*3 in the caller?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I was being silly - I was doing other things between calling the function and displaying the result
