Hello. Thank you very much for your answer. I found an option "Configuration Properties\C/C++/General/Detect 64-bit Portability Issues". It was set to 'Yes'. I made it 'No'. Now I don't get these warnings about 'type cast'. The result: 1>Compiling... 1>getstring.c 1>d:\pgsql83\getstring\c_getstring.c(10) : warning C4273: 'Pg_magic_func' : inconsistent dll linkage 1> d:\pgsql83\getstring\c_getstring.c(10) : see previous definition of 'Pg_magic_func' 1>d:\pgsql83\getstring\c_getstring.c(24) : warning C4273: 'pg_finfo_getTimeFromApplication' : inconsistent dll linkage 1> d:\pgsql83\getstring\c_getstring.c(24) : see previous definition of 'pg_finfo_getTimeFromApplication' 1>Compiling manifest to resources... 1>Linking... 1>LINK : D:\pgsql83\c_getstring\Debug\getstring.dll not found or not built by the last incremental link; performing full link 1> Creating library D:\pgsql83\getstring\Debug\getstring.lib and object D:\pgsql83\getstring\Debug\getstring.exp 1>Embedding manifest... 1>Build log was saved at "file://d:\pgsql83\getstring\getstring\Debug\BuildLog.htm" 1>c_synctime - 0 error(s), 2 warning(s) ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== But the function doesn't work as well.... :( ERROR: invalid memory alloc request size 4294967293