- 신규로 표시
- 북마크
- 구독
- 소거
- 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